SMTP Cheat Sheet

Basic Commands

CommandDescription
telnet <server> 25Connect to the SMTP server using Telnet
EHLO <domain>Identify the sending host
MAIL FROM: <address>Specify the sender’s email address
RCPT TO: <address>Specify the recipient’s email address
DATAStart the message data
<message>Enter the message data
.End the message data
QUITEnd the session

SMTP Operations

OperationDescription
ConnectEstablish a connection to the SMTP server
EHLOIdentify the sending host and request the server’s capabilities
MAIL FROMSpecify the sender’s email address
RCPT TOSpecify the recipient’s email address
DATAStart the message data
MessageEnter the message data
QuitEnd the session

SMTP Response Codes

CodeDescription
220Service ready
221Service closing transmission channel
250Requested mail action okay, completed
354Start mail input; end with <CRLF>.<CRLF>
421Service not available, closing transmission channel
450Requested mail action not taken: mailbox unavailable
451Requested action aborted: local error in processing
452Requested action not taken: insufficient system storage
500Syntax error, command unrecognized
501Syntax error in parameters or arguments
502Command not implemented
503Bad sequence of commands
504Command parameter not implemented
550Requested action not taken: mailbox unavailable
551User not local; please try <forward-path>
552Requested mail action aborted: exceeded storage allocation
553Requested action not taken: mailbox name not allowed
554Transaction failed

Leave a Reply

Proudly powered by WordPress | Theme: Code Blog by Crimson Themes.