| The server sends a greeting | |
| S: | 220 We are Marlin - Pleased to make your acquaintance |
| The client announces itself with host name. It is permissible to use an IP address IAW RFC 5321 | |
| C: | HELO colt.example.com |
| Server acknowledges | |
| S: | 250 Marlin.devnet.leistware.com Hello colt.example.com [1.2.3.4] |
| Client gives the senders address | |
| C: | MAIL FROM: john@example.com |
| Server accepts the sender* | |
| S: | 250 OK |
Client sends the RCPT TO command followed by the recipient address.This command is repeated for multiple recipients. | |
| C: | RCPT TO: kennyl@example.com |
| Server accepts the recipient* | |
| S: | 250 Accepted |
| Client indicates the message is comming. | |
| C: | DATA |
| Server responds with instructions | |
| S: | 354 Enter message, ending with "." on a line by itself |
| Client sends the message headers followed by the message text. Then as instructed by the server a single dot on a line by itself. | |
| C: | From: john@example.com To: kennyl@example.com Subject: SMTP Session Reply-To: john@example.com Example.com: Custom headers no longer begin with an X- An SMTP session can be initiated with software like telnet between a client and an MTA. Most software takes the MTA's host name or ip address followed by the port as arguments. . |
| Server responds with the message ID - which completes the transaction. | |
| S: | 250 OK id=1n59wq-00068T-DY |
Client sends the QUIT command to terminate the session OR The MAIL FROM command to begin another transaction. | |
| C: | QUIT |
| Server signs off | |
| S: | 221 Marlin.devnet.leistware.com closing connection |