(self, arg)
| 556 | self.push('250 OK') |
| 557 | |
| 558 | def smtp_RCPT(self, arg): |
| 559 | if not self.seen_greeting: |
| 560 | self.push('503 Error: send HELO first'); |
| 561 | return |
| 562 | print('===> RCPT', arg, file=DEBUGSTREAM) |
| 563 | if not self.mailfrom: |
| 564 | self.push('503 Error: need MAIL command') |
| 565 | return |
| 566 | syntaxerr = '501 Syntax: RCPT TO: <address>' |
| 567 | if self.extended_smtp: |
| 568 | syntaxerr += ' [SP <mail-parameters>]' |
| 569 | if arg is None: |
| 570 | self.push(syntaxerr) |
| 571 | return |
| 572 | arg = self._strip_command_keyword('TO:', arg) |
| 573 | address, params = self._getaddr(arg) |
| 574 | if not address: |
| 575 | self.push(syntaxerr) |
| 576 | return |
| 577 | if not self.extended_smtp and params: |
| 578 | self.push(syntaxerr) |
| 579 | return |
| 580 | self.rcpt_options = params.upper().split() |
| 581 | params = self._getparams(self.rcpt_options) |
| 582 | if params is None: |
| 583 | self.push(syntaxerr) |
| 584 | return |
| 585 | # XXX currently there are no options we recognize. |
| 586 | if len(params.keys()) > 0: |
| 587 | self.push('555 RCPT TO parameters not recognized or not implemented') |
| 588 | return |
| 589 | self.rcpttos.append(address) |
| 590 | print('recips:', self.rcpttos, file=DEBUGSTREAM) |
| 591 | self.push('250 OK') |
| 592 | |
| 593 | def smtp_RSET(self, arg): |
| 594 | if arg: |
nothing calls this directly
no test coverage detected