SMTP, a process can transfer mail to another process on the same network
or to some other network via a relay or gateway process
accessible to both networks.
In this way, a mail message may pass through a number of intermediate
relay or gateway hosts on its path from sender to ultimate recipient.
The Mail eXchanger mechanisms of the domain name system (and section 5 of
this document) are used to identify the appropriate
next-hop destination for a message being transported.
Basic Structure
The SMTP design can be pictured as:
+----------+ +----------+When an SMTP client has a message to transmit, it establishes a two-way transmission channel to an SMTP server. The responsibility of an
+------+ | | | |
| User |<-->| | SMTP | |
+------+ | Client- |Commands/Replies| Server- |
+------+ | SMTP |<-------------->| SMTP | +------+
| File |<-->| | and Mail | |<-->| File |
|System| | | | | |System|
+------+ +----------+ +----------+ +------+
SMTP client SMTP server