Free Software And Apps Download

Everything you need to know about Simple Mail Transfer Protocol (SMTP)

Simple Mail Transfer Protocol (SMTP). It is a server-to-server email protocol. Most Internet-based email systems use SMTP to transport messages between servers and to local mail clients like Microsoft Outlook or Apple Mail.

SMTP Introduction

SMTP, which stands for “Simple Mail Transfer Protocol,” is a standard protocol for sending and receiving emails over the Internet. It is the most important part of email, and most email servers and email clients use it to send and receive messages.

SMTP is a set of rules for how email messages should be formatted, sent, and received. This includes how mail servers should talk to each other and how mail clients should talk to mail servers.

SMTP is a “push” protocol, which means that it is used to send email messages from one server to another or from a mail client to a mail server. Either another mail server or a mail client can be on the other end.

SMTP is usually used with other email protocols like POP3 and IMAP to get email messages from a mail server.


simple mail transfer protocol - smtp

What is Simple Mail Transfer Protocol (SMTP)?


A technical standard for the transmission of electronic mail (also known as email) via a network is referred to as the Simple Mail Transfer Protocol (SMTP). SMTP is a type of networking protocol that, like other networking protocols, enables PCs and servers to transmit data regardless of the underlying hardware or software that they use. In the same way that the use of a defined method for addressing an envelope enables the postal service to function, SMTP standardizes the process by which email moves from the sender to the recipient, so enabling broad email delivery.

SMTP is a mail delivery protocol, not a mail retrieval protocol. Even if the mail is delivered to the recipient’s mailbox by the postal service, the receiver is responsible for taking the mail out of the mailbox. In a similar manner, SMTP is responsible for delivering an email to the mail server of an email provider; however, other protocols are required in order for the recipient to obtain the email from the mail server and view it.

How does SMTP work?

All protocols for networking have a set way of exchanging data. SMTP is a way for an email client and a mail server to share information. An email client is the computer or web application that a user uses to read and send emails. A mail server is a special kind of computer that sends, receives, and forwards emails. Users don’t talk to mail servers directly.

Here’s a rundown of what happens between the email client and the mail server when an email starts to send:

  • SMTP Connection opened: Since SMTP uses the Transmission Control Protocol (TCP) as its transport protocol, this first step starts with a TCP connection between the client and the server. Then, the email client starts sending the email by sending a special “Hello” command (HELO or EHLO, described below).
  • Email data transferred: The client sends the server a set of commands along with the email’s actual content: the email header (which includes the email’s destination and subject line), the email body, and any other parts.
  • Mail Transfer Agent (MTA): A program called a Mail Transfer Agent runs on the server (MTA). The MTA checks the domain of the recipient’s email address. If it’s different from the sender’s, it uses the Domain Name System (DNS) to find the recipient’s IP address. This is the same as a post office looking up the zip code of a mail recipient.
  • Connection closed: When all the data has been sent, the client tells the server, and the server ends the connection. At this point, if the client doesn’t open a new SMTP connection, the server won’t get any more email from the client.

Most of the time, this first email server is not where the email will end up. After getting the email from the client, the server goes through this SMTP connection process again with another mail server. The second server does the same thing, and so on, until the email reaches the inbox of the recipient on a mail server run by the recipient’s email provider.

Like a letter being delivered, this procedure involves several steps before it reaches its destination. A letter is not delivered immediately from the sender to the receiver by a mail carrier. The letter is instead returned to the post office by the mail carrier. When a letter is mailed, it is sent to a different post office in a different town, and so on, until the letter reaches its final destination. The same protocol, SMTP, is used by email messages as they are relayed from server to server before they finally arrive at the intended recipient’s inbox.

Basic SMTP Command

As we said before, SMTP commands are a set of codes that make it possible for servers to send and receive email messages. Here are some of the most important SMTP commands you should know:

HELO or EHLO (Hello)

This is an important command that starts the whole process of sending an email. The email client is telling the SMTP server who it is. It is the start of a conversation, and the server usually sends back a HELO command with its domain name or IP address.


The sender will share a code that shows who the mail is from after the identification command. This tells the SMTP server that a new transaction is about to start and gives the email address. From here, the server resets everything and is ready to take the email address. Once it has been accepted, it will respond with a 250 OK code.

RCPT TO (Recipient To)

This command tells who the email is being sent to. It comes after the 250 OK reply code. Again, the SMTP server sends back the same code. At this point, another RCPT TO command with a different email address for the recipient can be sent. Depending on how many people will get the email, this can go back and forth as many times as needed.


This tells the client and server to send and receive data. All of the message’s content will be sent to the SMTP server, which will respond with a 345 reply code. The contents of the messages are sent to the server, and when the message is done, a single dot is sent on a line by itself. If the message has been accepted and is ready to be sent, the server sends a second 250 OK code. At this point, the message has already been sent.


Once the email has been sent, the client sends the server the QUIT command, which ends the connection. The server will send back a 221 code if it has been closed successfully.

RSET (Reset)

When the mail transaction needs to be stopped, this command is sent to the server. It doesn’t close the connection, but it does clear all information about the email and the people involved. You will usually use this when something went wrong, like putting in the wrong information for the recipient, and the process needs to start over.
Imagine that these commands are the words that email servers use to talk to each other. Their talk will be a little like this:

Imagine that these commands are the words that email servers use to talk to each other. Their talk will be a little like this:




Other SMTP commands, like AUTH and STARTTLS, handle authentication and improve security. Read this guide to SMTP commands if you want to learn more about them or see how they work.

What is SMTP server?

An SMTP server is a mail server that uses the SMTP protocol to send and receive emails. To send an email, email clients connect directly to the SMTP server of the email provider. On an SMTP server, many different kinds of software run:

  • Mail submission agent (MSA): The email client sends emails to the mail submission agent (MSA).
  • Mail transfer agent (MTA): The MTA sends emails to the next server in the chain of servers that deliver them. As was said above, if it needs to, it may ask the DNS for the domain’s mail exchange (MX) DNS record.
  • Mail delivery agent (MDA): The MDA gets emails from MTAs and puts them in the email inbox of the person who sent them

What is an SMTP envelope?

The SMTP “envelope” is the set of information about where the email came from and where it is going that the email client sends to the mail server. The SMTP envelope is not the same as the email header or body, and the email recipient can’t see it.

What port is used by SMTP?

In networking, a port is the virtual place where network data comes in. It’s like the apartment number in an address. Ports help computers sort out network data and send it to the right programs. Firewalls and other network security tools can block ports that aren’t needed to stop malicious data from being sent and received.

In the past, SMTP only worked with port 25. SMTP still works with port 25, but it can also work with ports 465, 587, and 2525.

  • Port 25: Most SMTP servers connect to each other through port 25. Spammers try to use this port to send a lot of spam, so firewalls for end-user networks often block it.
  • Port 465: SMTP used to be able to use Secure Sockets Layer (SSL) encryption on port 465. But Transport Layer Security (TLS) took the place of SSL, so modern email systems don’t use this port. It only shows up in old, out-of-date systems.
  • Port 587: The default port for email submission is now 587. TLS is used to encrypt SMTP communications that go through this port.
  • Port 2525: Port 2525 is not officially a part of SMTP, but some email services offer SMTP delivery over this port in case the above ports are blocked.

What’s different about SMTP compared to other email protocols?

Think back to how we explained SMTP, and you’ll remember that we said it was one of many ways to send emails. The other two most common email protocols are POP and IMAP.

The main difference between these protocols is that only SMTP can send or “push” email from one unknown mail server to another. POP and IMAP are both ways to get mail from a person’s own mail server. This is called “pulling” mail. So, POP and IMAP only let mail move between verified mail servers. You can’t use them to talk to people outside your own networks.

We’ll go into more detail about how POP and IMAP work and how they’re different from SMTP below.


Post Office Protocol, or POP, is used to get messages sent to you. The most recent version is POP3, which was changed the last time in 1988.

The name of this protocol comes from the fact that it works in the digital world like a real-world post office. POP3 will get emails and hold on to them until clients come and get them. All of the emails are downloaded and stored locally, which is helpful for people who only use one computer to check their emails. It is also often used by businesses so that employees can check their emails even when they aren’t online.

What’s different about POP and SMTP?

  • POP is a way to get to your messages, while SMTP is a way to send them. In other words, SMTP is used to send mail from one user to another, while POP is used to receive mail.
  • SMTP is used twice: once to connect the sender and the email server and send information, and again to connect the sender and the recipient and send information. POP is only used once between the mail server and the person receiving the mail.


Internet Message Access Protocol is what IMAP stands for. IMAP stores messages on an email server, but the user can get to this server to check their emails and change how they are set up. The difference between this and POP is that IMAP uses a cloud server so emails can be authenticated and categorized by any device. Many email users prefer IMAP to POP because of the convenience and efficiency.

If you’ve ever set up your own email client, you probably encountered IMAP on an interface like this one:

What’s different about IMAP and SMTP?

SMTP is a message transfer protocol, while IMAP is a message access protocol (like POP) (like POP). So while SMTP sends messages and handles outgoing email, IMAP only retrieves messages and handles incoming email.

What is ESMTP (Extended SMTP)?

Extended Simple Mail Transfer Protocol (ESMTP) is a version of the protocol that adds to what it could do before. For example, it lets you send email attachments, use TLS, and do other things. ESMTP, not SMTP, is used by almost all email clients and email services.

ESMTP has some extra commands, like “EHLO,” which is a “extended hello” message that lets ESMTP be used at the beginning of a connection.

Advantages of SMTP

  • The users can have their own server if they need to.
  • It makes mass mailing possible.
  • Low cost and a large area covered.
  • Offer different ways to track emails.
  • Trusty and quick email delivery

Disadvantages of SMTP

  • Several firewalls can block SMTP’s common port.
  • The bigger problem is the security of SMTP.
  • The fact that it is simple limits how useful it can be.
  • You can only use 7 bit ASCII characters.
  • If a message is longer than a certain length, SMTP servers may reject the whole message.
  • Usually, sending your message will require more processing between servers, which will slow down sending and make it more likely that it won’t be sent.




Comments are closed.