Reputation: 11900
The wikipedia page on SMTP gives a good example of an exchange between Alice and Bob.
Using that as an example, I was curious about some of the specifics of how SMTP works
It looks like SMTP is not a file standard, but more of a standard that describes how data is transferred from a sender to a recipient. SMTP-compliant clients can both understand the same "language" (i.e. commands) to transfer data between them. Is that a correct understanding?
The DATA
command describes the data sent. When I receive a message (for example, in GMail) I can view the original email in raw format and it often looks just like that. Is that a standard? Or is just a generally accepted way to format data so that clients can parse them? I'd imagine even something as simple as the date formatting could get messy.
The DATA
section specifies the sender and recpient. Why does this information need to specified again when it was just sent via SMTP in the two previous commands MAIL FROM:
and RCPT TO:
?
Thanks!
Upvotes: 0
Views: 69
Reputation: 38573
From
, To
, and Cc
headers in the raw message text do not have to match the addresses specified in the MAIL FROM
and RCPT TO
commands. The message headers also contain more information than what is passed to MAIL FROM
and RCPT TO
such as the recipient names.For more information about the SMTP protocol, you could read rfc5321.
Upvotes: 1