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
MAIL FROM: <email@example.com>
250 <firstname.lastname@example.org>... Sender ok
RCPT TO: <email@example.com>
250 <firstname.lastname@example.org>... Recipient ok
354 Enter mail, end with "." on a line by itself
From: joe <email@example.com>
To: jane <firstname.lastname@example.org>
Subject: this is a test email
Hey jane--disregard this email, i'm just testing.
- 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
). 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
- 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