SMTP (Simple Mail Transfer Protocol) – Starters Guide! 

22 Jul 2023
SMTP (Simple Mail Transfer Protocol) – Starters Guide! 

When it comes to emails, we send, receive, and sometimes even download files. 

What’s interesting is it all happens so seamlessly that we barely give it a second thought. But have you ever wondered about the invisible magic that makes it all happen? 

Well we all know that in a hit film, actors get all the attention. Meanwhile, a dedicated team behind the scenes pull all the strings. If we compare that situation to emails, that unsung hero is SMTP. It’s like the backstage crew, silently making sure every email reaches its destination. 

In this SMTP starter’s guide, I’ve broken down everything in 7 chapters. So, let’s get started!

Chapter 1: What is SMTP?

What is SMTP?

SMTP stands for Simple Mail Transfer Protocol. It’s an Internet standard for electronic mail (email) transmission. In simple words, SMTP Protocol is nothing but a set of rules that makes it easy for us to send and receive emails.

History of SMTP

The history dates back to the early 1980s. In 1982, a computer scientist Jon Postel published it as a standard protocol for sending mail from SMTP which from that point on has undergone several updates but remains very much as the standard for email transmission.

Role SMTP Plays

SMTP acts as the backbone of the email system. It sends your emails across networks, no matter where you’re sending your email to your colleague close by in the next office or a friend who lives in a totally different country.

Chapter 2: SMTP Configuration

SMTP Server Settings

To send mail from SMTP, you will have to set your SMTP server settings. In the settings, you’ll mostly see the SMTP server name, the port number of your choice, and your username and password.

SMTP Port Numbers

These are the most specific port numbers: 25, 465 or 587. Out of these three, 25 is the standard which is used for sending mail from SMTP or we can say it acts as an SMTP relay. But that doesn’t mean 465 and 587 are useless. On one end 465 is used for SSL. On another, we see 587 for TLS encryption.

SSL/TLS encryption

How would the system know if a legitimate user is sending emails? That’s where authentication jumps in. A username and a password is must to ensure that only real users are sending emails. In fact in most cases email data is secured with the use of SSL/TLS encryption.

Chapter 3: How SMTP Work?

The SMTP Process

When you send an email, your email client sends it on the SMTP server which then routes the email to the recipient’s SMTP server. The recipient’s server delivers the email to their inbox. All these steps happen in seconds behind the fuse.

SMTP Servers & Ports

Like a post office, SMTP servers use specific port numbers to send emails. Now most people think that port numbers are for sending emails only. That’s not true at all. Some port numbers ensure that the email data is encrypted for security, while others specify the kind of ‘authentication’ required to verify that the email is coming from a legitimate source and not some hacker.

SMTP Responses

The status of the sent message is communicated using SMTP through the response codes. For example, a ‘250’ means that the operation was successful while a ‘550’ means the recipient’s email address doesn’t exist.

Chapter 4: The SMTP Commands

Key SMTP Commands

Command instructions are the things that the client tells the server. Examples include HELO is about starting an SMTP conversation), MAIL FROM is the person who’s sending the email, and DATA is the body of the message.

The SMTP Responses

Every command has a response which is supposed to be sent back to the client by a server. Now if data returns with “250 Ok”, we know that it’s ready to receive the body of the mail sent. 

In the real scenario, SMTP commands help for troubleshooting email sending problems. Each command and response give insights into how the email was processed by the server. And if something is not right, we can know what’s causing trouble.

Chapter 5: Types of SMTP Protocol

Sending via email seems like a simple procedure, but there is quite a lot of complexity around it. One such complication is understanding different types of SMTP systems that are used to send emails. Let’s discuss each in detail:

Originating SMTP

When you compose an email and press ‘send,’ the first system jump into action is the originating SMTP email server. This system communicates directly with the internet to start an email transferring process. So basically, as the name suggests, the originating SMTP report is an initial push which sends your email to the other person.

Delivery SMTP Server

Think of the delivery SMTP as the destination address of your email’s trip. It is the system that receives the emails from the internet and delivers them to their designated recipients. When you get an email in your inbox, you are thanking a delivery SMTP server.

Relay SMTP

Relay SMTP acts as a little middleman in this email sending process, relaying emails between two or more SMTP servers or Mail Transfer Agents (MTAs). It does not change anything about the message content. To help you understand better, I’d say relay SMTP servers act like couriers picking up and delivering packages (emails) without opening them.

Gateway SMTP

Last, but not least, we have the gateway SMTP or SMTP gateway. Similar to relay SMTP, it also transfers emails between different servers. But like relay SMTP, a gateway SMTP is allowed and sometimes required to transform the message if needed.

As already explained above, they serve as a protective barrier or firewall that rewrites addresses to shield the internal network. They can also function as intermediary SMTP servers converting messages to different formats as required by receiving systems.

In short, these various types of SMTP work together to ensure that when you click ‘send’, the email reaches its destination efficiently and securely. Identifying each type and how they operate can help you troubleshoot problems, optimize your email system, and make informed decisions about email management.

Right SMTP Service

Your choice of SMTP should be based on your needs whether you need advanced features, how important deliverability is to you, and the amount of email you send. Once you know that, you can choose the right SMTP server for yourself. To get started, here I’m listing some good SMTP service that might help you out: SendinBlue, Mailsnow, SendGrid, Amazon SES, Mailjet and Sparkpost. Every SMTP service listed here is reliable and might have different terms and conditions. Make sure you read everything before starting using any of them.

Chapter 6: SMTP vs POP vs IMAP

POP and IMAP Work

While SMTP is used for sending emails, POP (Post Office Protocol) and IMAP (Internet Message Access Protocol) are used for receiving emails. They allow email clients to get messages from a mail server.


SMTP, POP, and IMAP each have different roles for sending emails. SMTP is like the mail carrier delivering the mail, while POP and IMAP are like the mailbox that holds the mail until you pick it up.

Use for Each Protocol

POP might be a good choice if you only access your email from one device. However, if you use multiple devices to access your email, IMAP is the better protocol as it keeps your inbox in sync across all of them. SMTP is used no matter which protocol you are using, whether that’s POP or IMAP.

Chapter 7: Troubleshooting SMTP

Common Errors During SMTP

Some common errors of SMTP are incorrect server settings, bad networks, or recipient problems. These include:

  1. “550 Requested action not taken mailbox unavailable” – This error means that the email won’t be delivered since the recipient’s mailbox is unavailable. This can happen if there isn’t any email address for the recipient or the mailbox is really full.
  2. “421 Service not available, closing transmission channel” – This error means that the service which is sending the email isn’t available (the SMTP server). It can be due to network problems or a fact that the specified server is temporarily down.

Troubleshooting SMTP Protocol

Check your server settings when you are troubleshooting SMTP issues. Make sure the server name, port number, and authentication details are right. Once that’s done, test your network connection. If the problem is still not solved, check for clues on the server’s response codes. There are many tools and resources available to fix SMTP problems such as MX Toolbox, an online tool that can verify your SMTP server and diagnose issues.

Now Digital Eazy

Transform your Business in to
Digital Organisation

Google Primer Partner