SMTP just defines the transport protocol for sending email (simple mail) and does NOT define the email structure (headers, body, attachments).

SMTP is for mail transport--it's not a protocol used for retrieving your email from your inbox. POP and IMAP protocols do that sort of thing.

An example conversation might go like the below. In this case, the "client" is the machine that initiates the conversation. Different SMTP servers respond differently in the text--but the status codes are the same.

  • client connects to server at port 25 (standard port for SMTP)
  • server says:
    220 domain.dom ESMTP Sendmail 8.9.3/8.9.3; Sat, 27 May 2000 01:24:08 -0500
  • client:
    MAIL FROM: <joe@joe.dom>
  • server:
    250 <joe@joe.dom>... Sender ok
  • client:
    RCPT TO: <jane@joe.dom>
  • server:
    250 <jane@joe.dom>... Recipient ok
  • client:
  • server:
    354 Enter mail, end with "." on a line by itself
  • client:
    From: joe <joe@joe.dom>
    To: jane <jane@joe.dom>
    Subject: this is a test email
    Hey jane--disregard this email, i'm just testing.
  • server:
    250 OK
  • The session is maintained and the client can send additional email....
Typically I will telnet into the SMTP port of my servers to check to see if everything is ok (routing, relaying, addressing). Most SMTP servers will copy the ip address you're coming from and the time/date--so this isn't the best way to forge emails.

Related RFCs:

  • RFC 821: Simple Mail Transfer Protocol (now obsolete by RFC 2821)
  • RFC 822: Standard for format of ARPA Internet text messages (defines headers and the structure of the email) (now obsoleted by RFC 2822)
  • RFC 2821
  • RFC 2822

Log in or register to write something here or to contact authors.