Sending email: SMTP (Simple Mail Transfer Protocol)
The SMTP server listens on TCP port 25 by default. SMTP defines how a mail client talks with a mail server and how a mail server talks with another.
Email delivery over the Internet requires the following components:
Mail Submission Agent (MSA)
Mail Transfer Agent (MTA)
Mail Delivery Agent (MDA)
Mail User Agent (MUA)

A Mail User Agent (MUA), or simply an email client, has an email message to be sent. The MUA connects to a Mail Submission Agent (MSA) to send its message.
The MSA receives the message, checks for any errors before transferring it to the Mail Transfer Agent (MTA) server, commonly hosted on the same server.
The MTA will send the email message to the MTA of the recipient. The MTA can also function as a Mail Submission Agent (MSA).
A typical setup would have the MTA server also functioning as a Mail Delivery Agent (MDA).
The recipient will collect its email from the MDA using their email client.
telnet commands:
HELO
orEHLO
e.g. “HELO client.example.com”)MAIL FROM
specifies the sender’s email addressRCPT TO
specifies the recipient’s email addressDATA
indicates that the client will begin sending the content of the email message..
is sent on a line by itself to indicate the end of the
More on commands on https://www.samlogic.net/articles/smtp-commands-reference.htm
Wireshark example of similar exchange

Last updated