# Email Marketers’ Guide to SMTP (Simple Mail Transfer Protocol)

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "headline": "What Is SMTP? Types, Components, & How It Works",
  "description": "Learn what SMTP (Simple Mail Transfer Protocol) is, its types, components, and how it helps send emails from one account to another over the internet.",
  "image": "https://res.cloudinary.com/mailmodo/image/upload/strapi/uploads/smtp_f25f36f080.jpg",
  "datePublished": "2020-10-04T23:49:32.955Z",
  "dateModified": "2025-04-30T11:49:10.412Z",
  "publisher": {
    "@type": "Organization",
    "name": "Mailmodo",
    "url": "https://www.mailmodo.com/",
    "sameAs": [
      "https://www.linkedin.com/company/mailmodo/",
      "https://www.facebook.com/mailmodo/",
      "https://www.instagram.com/mailmodohq/",
      "https://www.youtube.com/@mailmodo"
    ],
    "logo": "https://www.mailmodo.com/static/images/logo/logo-full.svg",
    "description": "Mailmodo is a complete email marketing platform that helps email marketers to create and send interactive emails to drive growth and engagement.",
    "address": {
      "@type": "PostalAddress",
      "addressLocality": "Lewes",
      "addressRegion": "DE",
      "postalCode": "19958",
      "streetAddress": "Mailmodo Technologies Inc. 16192, Coastal Highway",
      "addressCountry": {
        "@type": "Country",
        "name": "US"
      }
    },
    "contactPoint": {
      "@type": "ContactPoint",
      "email": "enquiries@mailmodo.com",
      "contactType": "customer service"
    }
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "What Is SMTP? Types, Components, & How It Works",
  "description": "Learn what SMTP (Simple Mail Transfer Protocol) is, its types, components, and how it helps send emails from one account to another over the internet.",
  "image": "https://res.cloudinary.com/mailmodo/image/upload/strapi/uploads/smtp_f25f36f080.jpg",
  "datePublished": "2020-10-04T23:49:32.955Z",
  "dateModified": "2025-04-30T11:49:10.412Z",
  "author": {
    "@type": "Person",
    "name": "Aquibur Rahman",
    "url": "https://www.mailmodo.com/guides/author/aquibur-rahman/"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Mailmodo",
    "logo": {
      "@type": "ImageObject",
      "url": "https://www.mailmodo.com/static/images/logo/logo-full.svg"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.mailmodo.com/guides/smtp/"
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "#creator",
  "description": "Email marketing software to create and send interactive emails to maximize conversions and reinvent your user journey",
  "email": "support@mailmodo.com",
  "image": "https://www.mailmodo.com/static/images/og-image.png",
  "knowsAbout": "Email marketing",
  "legalName": "Mailmodo Technologies Inc.",
  "location": "United States",
  "logo": "https://www.mailmodo.com/static/images/logo/logo-full.svg",
  "name": "Mailmodo",
  "sameAs": [
    "https://twitter.com/mailmodo",
    "https://www.facebook.com/company/mailmodo/",
    "https://www.linkedin.com/company/mailmodo/"
  ],
  "url": "https://www.mailmodo.com/"
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://www.mailmodo.com/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Guides",
      "item": "https://www.mailmodo.com/guides/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "smtp",
      "item": "https://www.mailmodo.com/guides/smtp/"
    }
  ]
}
</script>

## Table of contents

- What is a protocol?
- What is SMTP?
- How does SMTP work?
- Difference between SMTP, IMAP, & POP3
- What are the components of SMTP?
- What are the types of SMTP?
- How are emails sent using SMTP?
- SMTP for Gmail and Outlook
- Origin of SMTPs and popular SMTPs
- Conclusion

Email is among the widely used communication channel, and most internet system uses **Simple Mail Transfer Protocol SMTP** to transfer email from their server to the recipient’s server.

  

It’s a standard communication protocol used by mail servers and other message transfer agents and can impact the deliverability of your campaigns.

  

This guide will discuss what SMTP is and how it works in the email marketing landscape.

## What is a protocol?

A **protocol** consists of a set of rules and procedures which govern the exchange of data between two or more devices. Protocols define how data transmission will occur between electronic devices such as computers. They set the standard procedures for communication and the exchange of information.

  

The International Organization for Standardization established the [Open Systems Interconnection (OSI)](https://www.iso.org/ics/35.100/x/). One such widely used Internet protocol lays down the standard for communication over different networks. The model divides the process of data transmission into a series of seven layers.

  

**Important internet protocols are TCP/IP, HTTPS, DNS, and SMTP.**



## What is SMTP?

**Simple Mail Transfer Protocol (SMTP)** is an email communication protocol that is used by mail servers to send emails from one account to another via the internet.

## How does SMTP work?

The Transmission Control Protocol (TCP) is the primary connection for communication between the mail sender and the mail receiver. In SMTP, the mail sender sends the data in command strings over this reliable ordered data stream channel.

  

The SMTP client, the initiating agent, sender, or transmitter, initiates the communication session. It issues the command strings and opens the session for corresponding responses from the SMTP server, which involves the listening agent or receiver. Zero or more SMTP transactions may be there in a course.

  

  
![How SMTP works: Sender's server to internt to receiver's mail server](https://res.cloudinary.com/mailmodo/image/upload/f_auto,q_100/v1655188003/strapi/How_SMTP_works_0a46ace926.png)

  

Usually, an SMTP email transaction follows four command or reply sequences:

### HELO/EHLO command

It tells the email server that the client wants to start the mail transaction. The client mentions its domain name after this command.

### MAIL command

It lays down the bounce address/return address, defining the return or reverse paths.

### RCPT command

It specifies the recipient of the message. The sender’s envelope contains the addresses of the recipients, to which the RCPT command can be issued multiple times for each recipient.

### DATA

It shows where the content of the message starts, as opposed to its envelope. An empty line separates the message header and body in the message’s text.

  

**DATA is not just one command but a group of commands in which a server has to reply twice.**

  

-   First, the server acknowledges the message and replies with its readiness to take the message.
-   Then after completing the end-of-data sequence, it either accepts or rejects the entire message.

  

Apart from the reply of the DATA command, the server can reply in a positive way (2xx reply codes) or a negative way.

  

The negative responses can further be permanent (5xx codes) or transient (4xx codes).

  

If a server sends *‘reject,’* then it is a permanent failure, and the client needs to send a bounce message to the respective server. On the other side, a ‘drop’ is a positive reply in which the message is discarded instead of delivered.

  

**Related guide:** [All About Hard Bounce & Soft Bounce](https://www.mailmodo.com/guides/hard-bounce-soft-bounce/)

Take a look at a sample exchange between sending server and the receiving server.

|From|Command|Meaning|
|--|--|--|
|Sending server|HELO client.gmail.com|Identifies itself with the domain name or IP address to start the conversation|
|Receiving server|250|OK|
|Sending server|MAIL FROM <mark@gmail.com>|Specifies the sender of the email|
|Receiving server|250|OK|
|Sending server|RCPT TO <clair@yahoo.com>|Specifies the recipient of the email|
|Receiving server|250|OK|
|Sending server|DATA|Request to start the transfer of email contents, date, subject line, etc.|
|Receiving server|354|Allows the sender to start the transfer of information|
|Sending server|Date: Sunday, 30 July 2023|Date of the email|
|Sending server|Subject: Welcome to the party!|Subject of the email|
|Sending server||Empty line|
|Sending server|We welcome you to the party. We hope to have a lot of fun together|Content of the email|
|Sending server|.|Terminates the transfer of email contents|
|Receiving server|250|Ok|
|Sending server|QUIT|Request to terminate the session|
|Receiving server|221|Closing session|





## Difference between SMTP, IMAP, & POP3

Although these three protocols are used for email delivery, they still possess a few key differences.

SMTP is an [email protocol](https://www.mailmodo.com/guides/email-protocol/) used by mail servers use to send emails over the internet. It sets the rules for other email servers on error handling. Email behemoths like Gmail and Outlook use SMTP protocol to deliver billions of emails daily. The drawback of this protocol is that there isn’t a built-in mechanism for authenticating the sender’s identity, leaving users vulnerable to spoofing attacks. That’s why, you must set up [SPF, DKIM, and DMARC](https://www.mailmodo.com/guides/email-authentication/) records that help email servers authenticate your emails.

IMAP is an email protocol that is used to retrieve emails from an email server. With this protocol, you will be able to access the email content but can’t download it to your local machine. The email content will stay in the email server and can be accessed from any device.

Finally, the POP3 is an email protocol that is also used to retrieve emails. But it differs from the IMAP due to its ability to download emails from mail servers to your local machine. The only caveat is that the email will be removed from the mail server and will remain accessible on the downloaded local machine.

**Related guide:** [POP3 vs IMAP: Which One Should You Use](https://www.mailmodo.com/guides/pop3-vs-imap/)



## What are the components of SMTP?

There are two primary components of the SMTP client and SMTP server:

1.  User-agent (UA)
2.  Mail transfer agent (MTA)

  

### User-Agent (UA)

The **User-Agent (UA)** is responsible for preparing, creating, and putting the message in the form of an envelope for transmission.

### Mail Transfer Agent (MTA)

The **Mail Transfer Agent (MTA)** then transfers this message to the recipient across the internet.

The SMTP servers support a more complex system by adding a relaying system. Under this, more MTAs can be placed at either sending or receiving sides.

  

In addition, this [SMTP relay system](https://www.mailmodo.com/guides/smtp-relay/) can use mail gateways and work without TCP/IP protocols if needed.

![Components of SMTP](https://res.cloudinary.com/mailmodo/image/upload/f_auto,q_100/v1655188147/strapi/Components_of_SMTP_7250839a63.png)


## What are the types of SMTP?

The different types of SMTP are:

### 1.  End-to-end SMTP

In the SMTP model, the client-SMTP starts the communication session, whereas the SMTP at the receiver’s side responds to the client’s request. The end-to-end SMTP protocol helps send emails to servers at various other organizations. This model acts as a medium of communication between different organizations.

### 2.  Store-and-forward SMTP

The store-and-forward SMTP model is different from the end-to-end SMTP model. The store-and-forward type is used within an organization only, unlike the end-to-end SMTP.

After contacting the destination’s host directly, the [SMTP server](https://meetanshi.com/magento-2-smtp.html) keeps the mail to itself until the receiver’s SMTP successfully receives a copy of the email.

## How are emails sent using SMTP?

The process of sending emails via SMTP port consists of the following sequential steps:

### 1.  Composition

With the help of a Mail Transfer Agent (MUA) program, the user sends an email. The content of the email consists of two parts, [the email header](https://www.mailmodo.com/guides/email-header/) and the email body.

  

The header is the message’s subject, while the body is the main content. The sender and recipient address also comes under the header part. The header acts like an envelope holding the letter (message).

### 2.  Submission

The mail client (mail user agent, MUA) submits the email to a mail server (known as a mail submission agent, MSA) using SMTP on TCP port 587 or the traditional port 25. The MSA further delivers the mail to its mail transfer agent, MTA.

### 3.  Mail delivery

The two parts of an email address are the recipient’s username and the domain name.

  

For example, mayank@gmail.com, ‘Mayank’ is the username, and ‘[gmail.com](http://gmail.com/)’ is the domain.

  

In case the domain name of the recipient’s email address does not match the sender’s domain name, then the mail submission agent (MSA) will send the mail to the (MTA). The MTA will search for the particular domain to relay the mail. IT happens in two steps:

-   First, it checks the [MX record](https://mxtoolbox.com/) from the Domain Name System (DNS) to obtain the target domain. The MX record contains recipients’ domain names and IP addresses.
-   Once it locates, MTA establishes the connection with the exchange server and relays the message.

This email transfer from one SMTP server to another is called an SMTP relay. And to keep your emails delivered smoothly with high deliverability, you may need SMTP relay services. Unlike other email clients like Gmail and Outlook, SMTP relay services make sure that your emails are delivered even if they’re in large volume.

  
Related guide: [SMTP Relay: What Is It and How Does It Work](https://www.mailmodo.com/guides/smtp-relay/)

### 4.  Receipt and processing

After receiving the incoming message, the exchange server delivers it to the Mail Delivery Agent. Then, it stores the email and waits for the retrieval by the user.

### 5.  Access and retrieval

The user can access the MUA with the login and password. In addition, the MUA helps retrieve the stored email from the MDA.





## SMTP for Gmail and Outlook

Here are the steps for accessing your emails Gmail and Outlook emails on any email clients using [SMTP](https://www.duocircle.com/email/outbound-smtp).

### SMTP for Gmail

Gmail makes it quite easy to access its emails from other email clients like Microsoft Outlook and Apple Mail. Here are the steps you need to follow to access your Gmail emails from any email client.

  

1.  From the top right corner, go to Settings > See all settings.
    
2.  Go to the Forwarding and POP/IMAP tab.
    
3.  In the "IMAP Access" section, select Enable IMAP.
    
4.  Click on Save Changes.
    
5.  Enter the required information in your email client according to the table below to access emails of Gmail.
    

  
| Configuration property | Value |
|--|--|
| Incoming Mail (IMAP) Server | imap.gmail.com |
| Requires SSL | Yes |
|Port|993|
|Outgoing Mail (SMTP) Server|smtp.gmail.com|
|Requires SSL|Yes|
|Requires TLS|Yes (if available)|
|Requires Authentication|Yes| 
|Port for SSL| 465|
|Port for TLS/STARTTLS| 587|
|Full Name or Display Name | Your name|
|Account Name, User name, or Email address|Your full email address|
|Password|Your Gmail password|

### SMTP for Outlook

Here are the setting you need to follow to set up and access Outlook emails on any email client.

1.  Go to Settings > View all Outlook settings > Mail > Sync email.
    
2.  Under POP and IMAP, select Yes under Let devices and apps use POP.
    
3.  Click on Save.
    
4.  Enter the required information in your email client according to the table below to access emails of Gmail.
    
|Configuration property| Value |
|--|--|
|IMAP server name  | outlook.office365.com |
|IMAP port|993|
|IMAP encryption method|TLS|
|POP server name|outlook.office365.com|
|POP port|995|
|POP encryption method|TLS|
|SMTP server name|smtp-mail.outlook.com|
|SMTP port|587|
|SMTP encryption method|STARTTLS|

## Origin of SMTPs and popular SMTPs

In 1982, Sendmail with 4.1cBSD, one of the first MTAs to implement the Simple Mail Transfer Protocol, was released. With time, it became a commonly used mail transfer agent.

  

Some other SMTP server programs that have become popular include:

  

1.  [Postfix](https://www.postfix.org/)
2.  [Qmail](https://qmail.com.bd/qmail/)
3.  [Novell GroupWise](https://www.novell.com/documentation/groupwise18/)
4.  [Exim](https://www.exim.org/)
5.  [Novell NetMail](https://support.novell.com/techcenter/articles/ana20030101.html)
6.  [Microsoft Exchange Server](https://docs.microsoft.com/en-us/exchange/exchange-server?view=exchserver-2019)
7.  [Oracle Communications Messaging Server](https://docs.oracle.com/cd/E63708_01/index.htm)

  

In 1998 and 1999, new trends in the delivery of emails and the introduction of the Message submission (RFC 2476) and SMTP-AUTH (RFC 2554), respectively.

  

Some of the most popular SMTP servers include [amazon ses](https://www.mailmodo.com/guides/amazon-ses-email-marketing/), Sendgrid, [Mailgun](https://www.mailmodo.com/comparison/mailgun-alternative/), etc.

## Conclusion

SMTPs are essential for sending and receiving emails. However, as an email marketer, you need to choose and configure the SMTP service providers that suit your requirements.

  

At Mailmodo, we provide easy SMTP setup and integration with any SMTP servers you might like to send your email marketing campaigns. Feel free to reach out to the Mailmodo team to learn more or check out our [SMTP setup help guide.](https://support.mailmodo.com/support/solutions/articles/84000351434-using-custom-smtp-with-mailmodo)

---

**Author: Aquibur Rahman**

Aquibur is the CEO and co-founder of Mailmodo. He has assisted various tech companies in setting up their email marketing infrastructure.

