Simple Mail Transfer Protocol (SMTP)

What is SMTP?

Simple mail transfer protocol (SMTP) is TCP/IP application layer protocol using TCP port 25. It is used to sending and receiving e-mail over the Internet to another SMTP server. But SMTP has limitation in ability to queuing the messages at receiving end, so POP or IMAP are used. Generally SMTP is used for sending the e-mails and POP or IMAP for receiving the e-mails.

At history point, SMTP developed in 1970 in US Government’ ARPANET to exchange mails between few computers.

SMTP as its name ” simple ” it only exchange text based information but after developing of Enhanced SMTP (ESMTP) it is possible to send media files also.

SMTP also use port 587 for more security.

what is smtpHow SMTP works?

Let we assume receiver mail address is r@x.com and sender mail address is s@y.com

1. I setup a email account at y.com using Outlook Express as a mail client and we told Outlook Express my mail server is mail.y.com. After that I am compose a email and press the send button.

2. Outlook Express connects with SMTP server of mail.y.com via TCP port 25.

3. Outlook Express communicate with SMTP server of y.com giving the sender and receiver address with including content of message.

4. SMTP server fo y.com breaks the receiver address into two parts recipient name (r) and domain name (x.com). If receiver address is found local in y.com then SMTP simply forward the mail to POP server ( Post Office Protocol ) of y.com using its delivery client else it will need to communicate the receiver domain name.

5. Now SMTP server communicate with DNS server ( Domain Name Server) for asking the IP address of receiver domain name. DNS will replies the IP address of receiver domain name.

6. After getting receiver IP address sender SMTP server of y.com connect with SMTP server of x.com asking to check its list of account to find recipient. X.com SMTP server find recipient address in their list and forward the message to x.com POP server which puts the message in r@x.com mailbox.

Note: Here Outlook Express is technically called Mail user agent (MUA), sending the mail by Mail submission Agent (MSA) and delivery agent is called Mail transfer Agent (MTA). These are words used technically but I don’t used those word in this article because of more simplicity.