MCPcopy Index your code
hub / github.com/RustPython/RustPython / smtp_HELP

Method smtp_HELP

Lib/test/support/smtpd.py:459–492  ·  view source on GitHub ↗
(self, arg)

Source from the content-addressed store, hash-verified

457 return result
458
459 def smtp_HELP(self, arg):
460 if arg:
461 extended = ' [SP <mail-parameters>]'
462 lc_arg = arg.upper()
463 if lc_arg == 'EHLO':
464 self.push('250 Syntax: EHLO hostname')
465 elif lc_arg == 'HELO':
466 self.push('250 Syntax: HELO hostname')
467 elif lc_arg == 'MAIL':
468 msg = '250 Syntax: MAIL FROM: <address>'
469 if self.extended_smtp:
470 msg += extended
471 self.push(msg)
472 elif lc_arg == 'RCPT':
473 msg = '250 Syntax: RCPT TO: <address>'
474 if self.extended_smtp:
475 msg += extended
476 self.push(msg)
477 elif lc_arg == 'DATA':
478 self.push('250 Syntax: DATA')
479 elif lc_arg == 'RSET':
480 self.push('250 Syntax: RSET')
481 elif lc_arg == 'NOOP':
482 self.push('250 Syntax: NOOP')
483 elif lc_arg == 'QUIT':
484 self.push('250 Syntax: QUIT')
485 elif lc_arg == 'VRFY':
486 self.push('250 Syntax: VRFY <address>')
487 else:
488 self.push('501 Supported commands: EHLO HELO MAIL RCPT '
489 'DATA RSET NOOP QUIT VRFY')
490 else:
491 self.push('250 Supported commands: EHLO HELO MAIL RCPT DATA '
492 'RSET NOOP QUIT VRFY')
493
494 def smtp_VRFY(self, arg):
495 if arg:

Callers

nothing calls this directly

Calls 2

pushMethod · 0.95
upperMethod · 0.45

Tested by

no test coverage detected