Like all servers, an SMTP server is an application that offers a service to other applications within a network called clients. Specifically, an SMTP server handles email sending, receiving, and relaying.

You can think of servers as your real-life post offices. When you send a letter from City A to City B, it first reaches a local post office in City A; here, it gets processed and sent to the post office in City B, which delivers it to its final destination.

The same happens with SMTP servers—though the process takes a few minutes at most instead of taking days.

You might have also come across the term SMTP port. Those communication endpoints handle email data transfer over SMTP as it moves through a network from one server to another. We cover those in detail here.

How does SMTP work?

How does SMTP work_

All networking protocols follow a predefined process for exchanging data. SMTP defines a method for exchanging data between an email client and a mail server. An email client is what a user interacts with: the computer or web application where they access and send emails. A mail server is a specialized computer for sending, receiving, and forwarding emails; users do not interact directly with mail servers.

SMTP connection opened

Since SMTP uses the Transmission Control Protocol (TCP) as its transport protocol, this first step begins with a TCP linking between client and server. Next, the client starts the email-sending process with a specialized “Hello” command (HELO or EHLO, described below).

Email data transferred

The client sends the server a series of commands accompanied by the actual content of the email: the email header (including its destination and subject line), the email body, and any additional components.

Mail Transfer Agent (MTA)

The server runs a program called a Mail Transfer Agent (MTA). The MTA checks the domain of the recipient’s email address, and if it changes from the sender’s, it queries the Domain Name System (DNS) to find the recipient’s IP address. It is like a post office looking up a mail recipient’s zip code.

Connection closed

The client signals the server when the data transmission is complete, and the server ends the linking. At this point, the server will not receive other email data from the client unless the client opens a new SMTP connection.

Usually, this first email server is not the email’s final destination. After receiving the email from the client, the server repeats this SMTP connection process with another mail server. That second server does the same until, finally, the email reaches the recipient’s inbox on a mail server controlled by the recipient’s email provider.

Types of SMTP servers

Normal Servers

A regular SMTP server recognizes emails and lines which the recipient receives. It requires you to specify several contiguous domains served by the server. If any email comes in from another domain and a message can be sent, it will be sent to its destination server. SMTP servers can be used as two-way delivery services. No incoming or outgoing. Read about how to use an SMTP server in your email marketing plan to increase your sales.

SMTP Proxy Servers

Proxy servers do not fully function like SMTP servers but require a real SMTP server to connect. Users connect to real SMTP servers through a proxy server to block unnecessary emails, monitor them, and edit their content.

What Port Does SMTP Use?

What Port Does SMTP Use_

In networking, a port is the default point where data is received from the network; Think of it like the apartment number in my mailing address. Ports help computers classify network data into the correct applications. Network security measures, such as firewalls, can block unnecessary ports to prevent malicious data from being sent and received.

Historically, SMTP only used port 25. Port 25 is still used for SMTP, but you can also use ports 465, 587, and 2525.

  • Port 25 is the most used for connections between SMTP servers. Firewalls of end-user networks often block this port today, as spammers try to abuse it to send large amounts of spam.
  • Port 465 is designated once for use by SMTP with Secure Sockets Layer (SSL) encryption. But SSL has been replaced by Transport Layer Security (TLS), so modern email systems don’t use this port. It only appears on old (deprecated) methods.
  • Port 587 is nowadays the default port for sending emails. SMTP connections over this port use TLS encryption.
  • Port 2525 is not officially connected with SMTP, but few email services offer SMTP delivery over this port if the above ports are blocked.

Is the SMTP server secure?

Surprisingly enough, the SMTP server isn’t inherently secure. It doesn’t have any encryption or security mechanisms built into it. It makes it vulnerable to spoofing, spamming, or data leakage. Email providers have added security layers to the infrastructure to avoid all those unfortunate events.

The first mechanism they incorporated was the Secure Sockets Layer (SSL), which had significant security flaws. As an effect, the Internet Engineering Task Force (IETF) deprecated its final version, SSL 3.0, in 2015 by enforcing RFC 7568.

Four years after SSL’s creation, another security standard, Transport Security Layer (TLS), was introduced to the public. Initially, it wasn’t perfect, but it improved throughout the years. As of 2022, the TLS 1.3 version is considered the safest email encryption protocol.

All of that is great, but at what point of the SMTP connection does TLS enter the game? By default, most email clients initiate a TLS connection during the handshake. They do so using the SMTP command STARTTLS, which forms the switch to an encrypted connection.

SMTP Server Troubleshooting Checklist

Let’s say you’ve checked the email sending of your app, and it’s alright. We hope that the Mailtrap Email Delivery Platform helped you with that :). But when you started using a real SMTP server for sending emails, they were not delivered. The following checklist will help you detect what may be wrong:

  • check the Internet connection
  • check the SMTP server configuration (server name, port, username, password)
  • try different SMTP ports
  • Test the SMTP server connection. For this, you can either use an online service like MXToolbox or perform a manual telnet session. Please read our blog post about testing SMTP servers to learn how to do this. You may also need to know SMTP commands and response codes for troubleshooting.


While SMTP servers aren’t the only TCP/IP protocol you can send and receive emails, utilizing one can provide several benefits. From ensuring your bulk marketing emails are successfully delivered to preventing messages from being marked as spam, an SMTP server may be worth using. Now that you know what an SMTP server is, it’s time to find the right service provider. With Mailchimp, you can obtain the infrastructure necessary to send mass marketing campaigns via email.