| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SMTP Mail Transaction Process (Page 3 of 3) SMTP Mail Transaction Details Lets take a more detailed look at the SMTP mail transaction process, using as aids the process diagram in Figure 305 and the example transaction of Table 250 (which has commands highlighted in bold and replies in italics). The first two steps in the mail transaction are responsible for providing the receiving SMTP server with the envelope information just discussed. The transaction begins by the SMTP sender issuing a MAIL command. This serves to inform the receiver that a new transaction is commencing, and also to tell it the from information on the envelope. An example: MAIL FROM:<joe@someplace.org>
The e-mail address of the originator is always enclosed in angle brackets (<and >). The SMTP receiver acknowledges the command with a 250 (OK) reply message, sometimes sending back the address as a confirmation. For example: 250 <joe@someplace.org> Sender ok Next, the SMTP sender uses RCPT commands to specify the intended recipients of the e-mail that is being sent. Each RCPT line can contain only one recipient, so if multiple recipients are indicated, two or more RCPT commands must be issued. Each one normally specifies an e-mail address, but if relaying is being used, the command may contain routing information as well. (As described in the SMTP communication topic, this is not as commonly done as it was in the past.) For example: RCPT TO:<jane@somewhereelse.com> Assuming the server accepts the e-mail, it will give a 250 OK reply again, such as this: 250 <jane@somewhereelse.com> Recipient ok The SMTP sender then issues the DATA command, which tells the SMTP receiver that the message is coming: DATA The SMTP receiver responds with a 354 intermediate reply message, such as this: 354 Enter mail, end with . on a line by itself The SMTP sender then sends the e-mail message, one line at a time, with a single . on a line to terminate it. The server confirms the receipt of the message with another 250 OK reply, and the transaction is done.
While this indeed is quite simple, I should point out that I have only shown an e-mail from a sender to one recipient, and the case where there are no problems or complications in the transaction. Due to either command syntax or server issues, it is possible for various types of errors to occur at different stages of the process, which may result in the transaction failing. There are also security concerns that may come into play, that may lead to restrictions in what transactions a server may allow.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||