MCPcopy Index your code
hub / github.com/python/cpython / smtp_HELP

Method smtp_HELP

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

pushMethod · 0.95
upperMethod · 0.45

Tested by

no test coverage detected