Open In App

Simple Mail Transfer Protocol (SMTP)

Last Updated : 14 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Simple Mail Transfer Protocol (SMTP) is an application layer protocol used for exchanging email messages between servers. It is essential in the email communication process and operates at the application layer of the TCP/IP stack.

To send an email, the client opens a TCP connection to the SMTP server. The server, which is always listening on port 25, initiates the connection as soon as it detects a client. Once the TCP connection is established, the client sends the email across the connection.

Simple Mail Transfer Protocol
SMTP

Types of SMTP Protocol

The SMTP model supports two types of email delivery methods: end-to-end and store-and-forward.

  • End-to-end delivery is used between organizations. In this method, the email is sent directly from the sender's SMTP client to the recipient's SMTP server without passing through intermediate servers.
  • Store-and-forward is used within organizations that have TCP/IP and SMTP-based networks. In this method, the email may pass through several intermediate servers (Message Transfer Agents, or MTAs) before reaching the recipient.

With end-to-end delivery, the SMTP client waits until the email is successfully copied to the recipient's SMTP server before sending it. This is different from the store-and-forward method, where the email might stop at multiple intermediate servers before reaching its destination. In store-and-forward systems, the sender is notified as soon as the email reaches the first server, not the final destination.

smtp-2
SMTP

Before diving deeper into the Model of SMTP System, it's important to understand how SMTP is leveraged by service providers like SMTP.com in the real-world scenario.

SMTP.com is a platform that caters to all your transaction, email relay and email delivery needs at a very affordable price. With decades of experience, SMTP.com is regarded as the most trusted sender in the industry by ISPs. SMTP.com had been trusted by over 100,000 customers over the years. SMTP.com is extremely intuitive and easy to set up. It can be integrated seamlessly into your current business system. If you need to migrate from another provider, SMTP.com make it effortless.

Features

  • Dedicated IP
  • Email API: Integrating SMTP.com with your business can be easy with the email API feature. They have complete API documentation on their website that can help you integrate your business in just 5 minutes.
  • 24x7 Customer Support: The round-the-clock support is one of the best features of SMTP.com. Support is available both on the website and also for paid customers. 24x7, all human support is available for all customers across all plans. No third party is involved and solutions are provided fast for easy implementation. Online chat support is also available for those who are looking for more information about SMTP.com
  • High Volume Sending Solutions: This newly launched feature is great for those businesses who want to send more than 250 million emails a month. Customized quotations and solutions are available.
  • Reputation Defender: This is an add-on feature that helps clean up your email lists. It doesn’t need any integration but actively monitors your lists and provides a report.

Pricing

SMTP.com offers affordable delivery services and caters to all kinds of businesses. Their plans range from $25 to $500 and above. The best part about this platform is that all the features are available in all the plans. The prices change only based on the volume of emails sent monthly. Even with the lowest price pack, users can get access to 24x7 customer support and all the SMTP tools. The Reputation Defender for list cleaning is an add-on feature available for all users.

Model of SMTP System 

122w3
SMTP Model

In the SMTP model user deals with the user agent (UA), for example, Microsoft Outlook, Netscape, Mozilla, etc. To exchange the mail using TCP, MTA is used. The user sending the mail doesn't have to deal with MTA as it is the responsibility of the system admin to set up a local MTA. The MTA maintains a small queue of mail so that it can schedule repeat delivery of mail in case the receiver is not available. The MTA delivers the mail to the mailboxes and the information can later be downloaded by the user agents.

Components of SMTP

  • Mail User Agent (MUA): It is a computer application that helps you in sending and retrieving mail. It is responsible for creating email messages for transfer to the mail transfer agent(MTA).
  • Mail Submission Agent (MSA): It is a computer program that receives mail from a Mail User Agent(MUA) and interacts with the Mail Transfer Agent(MTA) for the transfer of the mail.
  • Mail Transfer Agent (MTA): It is software that has the work to transfer mail from one system to another with the help of SMTP.
  • Mail Delivery Agent (MDA): A mail Delivery agent or Local Delivery Agent is basically a system that helps in the delivery of mail to the local system. 

How does SMTP Work?

smtp
SMTP

1. Sending Email:

  • When a user wants to send an email, they use a User Agent (UA), like Outlook or Gmail.
  • The email is handed over to the MTA, which is responsible for transferring the email to the recipient’s mail server.

2. SMTP Client and Server:

  • Sender-SMTP (Client): The email sender’s MTA initiates the connection to the recipient’s MTA (Receiver-SMTP).
  • Receiver-SMTP (Server): The receiving MTA listens for incoming connections and receives the email from the sender-SMTP.
  • This communication happens over TCP port 25.

3. Relays and Gateways:

  • Relays: In some cases, the email may pass through several intermediate MTAs before reaching the destination server. These MTAs act as relays.
  • Gateways: If the sending and receiving systems use different email protocols (e.g., SMTP and non-SMTP), an email gateway can convert the email to the appropriate format for delivery.

4. Email Delivery:

  • The sender’s MTA sends the email to the receiver’s MTA, either directly or through relays.
  • The MTA uses the SMTP protocol to transfer the message. Once it’s delivered to the destination MTA, the email is placed in the recipient’s mailbox.
  • The recipient’s User Agent (UA) can then download the email.

SMTP Envelope

Purpose

  • The SMTP envelope contains information that guides email delivery between servers.
  • It is distinct from the email headers and body and is not visible to the email recipient.

Contents of the SMTP Envelope

  • Sender Address: Specifies where the email originates.
  • Recipient Addresses: Indicates where the email should be delivered.
  • Routing Information: Helps servers determine the path for email delivery.

Comparison to Regular Mail

  • Think of the SMTP envelope as the address on a physical envelope for regular mail.
  • Just like an envelope guides postal delivery, the SMTP envelope directs email servers on where to send the email.

SMTP Commands

S.No. Keywor Command form  Description  Usage  
1.HELOHELO<SP><domain><CRLF>It provides the identification of the sender i.e. the host name.Mandatory
2.MAILMAIL<SP>FROM : <reverse-path><CRLF>It specifies the originator of the mail.Mandatory
3.RCPTRCPT<SP>TO : <forward-path><CRLF>It specifies the recipient of mail.Mandatory
4.DATADATA<CRLF>It specifies the beginning of the mail.Mandatory
5.QUITQUIT<CRLF>It closes the TCP connection.Mandatory
6.RSETRSET<CRLF>It aborts the current mail transaction but the TCP connection remains open.Highly recommended
7.VRFYVRFY<SP><string><CRLF>It is use to confirm or verify the user name.Highly recommended
8.NOOPNOOP<CRLF>No operationHighly recommended
9.TURNTURN<CRLF>It reverses the role of sender and receiver.Seldom used
10.EXPNEXPN<SP><string><CRLF>It specifies the mailing list to be expanded.Seldom used
11.HELPHELP<SP><string><CRLF>It send some specific documentation to the system.Seldom used
12.SENDSEND<SP>FROM : <reverse-path><CRLF>It send mail to the terminal.Seldom used
13.SOMLSOML<SP>FROM : <reverse-path><CRLF>It send mail to the terminal if possible; otherwise to mailbox.Seldom used
14.SAMLSAML<SP>FROM : <reverse-path><CRLF>It send mail to the terminal and mailbox.Seldom used

SMTP Ports

  • Port 587: This is the most commonly used port for secure SMTP submission using TLS (Transport Layer Security). It is recommended for client-to-server communication, as it ensures the security of the email transmission.
  • Port 465: Previously used for secure SMTP (SMTPS), this port is no longer considered an official standard and is generally not recommended anymore. Many email providers have moved away from port 465 in favor of port 587.
  • Port 25: This port is traditionally used for SMTP relay between mail servers, not for email submission from clients. It is often blocked by ISPs for outgoing mail due to its frequent use for spam and malicious activities.
  • Port 2525: Although not an official SMTP port, it is sometimes used as an alternative for SMTP submission, especially in cases where port 25 is blocked or restricted. Many email providers support this port as an alternative for secure communication.

Difference Between SMTP and Extended SMTP

SMTPExtended SMTP
Users were not verified in SMTP as a result of massive-scale scam emails being sent.In Extended SMTP, authentication of the sender is done.                                   
We cannot attach a Multimedia file in SMTP directly without the help of MMIE.We can directly attach Multimedia FIle in ESMTP.
We cannot reduce the size of the email in SMTP.We can reduce the size of the email in Extended SMTP.
SMTP clients open transmission with the command HELO.The main identification feature for ESMTP clients is to open a transmission with the command EHLO (Extended HELLO).

Advantages of SMTP

  • If necessary, the users can have a dedicated server.
  • It allows for bulk mailing.
  • Low cost and wide coverage area.
  • Offer choices for email tracking.
  • Reliable and prompt email delivery.

Disadvantages of SMTP

  • SMTP's common port can be blocked by several firewalls.
  • SMTP security is a bigger problem.
  • Its simplicity restricts how useful it can be.
  • Just 7-bit ASCII characters can be used.
  • If a message is longer than a certain length, SMTP servers may reject the entire message.
  • Delivering your message will typically involve additional back-and-forth processing between servers, which will delay sending and raise the likelihood that it won't be sent.

SMTP vs POP vs IMAP

SMTP

POP

IMAP

Stands for Simple mail transfer protocol

Stands for Post Office Protocol.

Stands for Internet Message Access Protocol.

Used for sending mail.

Used for retrieving mail.

Used for retrieving mail.

it is push protocol.

it is pull protocol.

it is pull protocol.

It work between sender’s mail server to receiver’s mail server and sender and sender’s mail server.

It work between receiver and receiver’s mail server.

It works between receiver and receiver’s mail server.

It does not store mail on server it just send the mail.

It download all the mail when it connected to internet.

It store all mail on server and download when it get request to download.

Works on TCP port number 25.

Works on TCP port number 110.

Works on TCP port number 143.

Connection oriented protocol.

Connection oriented protocol.

Connection oriented protocol.

It has persistence TCP connection.

It has persistence TCP connection.

It has persistence TCP connection.

Stateless protocol.

Stateful protocol.

Stateful protocol.

It is in band protocol.

It is in band protocol.

It is in band protocol.

Not used at receiver side.

Used at receiver side.

Used at receiver side.


Next Article
Article Tags :

Similar Reads