What is SMTP?

Have you ever wondered how your email gets to its recipient?


Email has been the go-to method of communications for so long that very few of us ever consider the underlying technology that's let the world share electronic messages since the 80s.

While companies like Slack attempt to find better ways for businesses to communicate, email remains ever prevalent in our lives. That's mainly thanks to the innovation of 'SMTP', or Simple Mail Transfer Protocol, which is the mechanism that underpins email communications. This has been the mechanism of email for over 40 years and a key part of its lasting importance.

SMTP can be seen as a framework for how data is sent between email servers. Most of the major email providers, such as Gmail and Microsoft's Outlook, use it as the basis for their data transmissions so that emails can be sent beyond their own services.

The origins of SMTP - which is also known as RFC 821 and  RFC 2821 - can be traced back to 1980 and computer scientists John Postel. Since then it has been changed and tweaked many times but the basic idea is still the same. There are four key components, called 'agents', that makeup SMTP - mail user agent (MUA), mail submission agent (MSA), mail transfer agent (MTA) and mail delivery agent (MDA). The protocol works by moving an email from one device's MTA to the agent of another machine. The other agents all have similar roles within the system as emails are reliant on all four parts.

The Post Office Protocol 3 (POP3) or even the Internet Message Access Protocol (IMAP) mechanisms are also deployed, depending on how users configure their email platforms, to gather and transfer emails to their destinations.

Both systems offer pros and cons, but most enterprise platforms normally use IMAP because emails can be stored on a server rather than on individual devices. When using IMAP, it's also important to specify which server stores the messages, so they can be received without delay or error by all devices which require them.

The SMTP server

An SMTP server is just a computer running SMTP. Once messages are picked up they are sent to this server for passing onto recipients.

Six steps to (email) heaven

An email is sent from sender to recipient using six steps.

1) The email is submitted by an MUA to a mail server's MSA.

2) This email is transferred to the server's MTA via port 25 (the MTA and MSA are typically hosted on the same SMTP server).

3) The MTA confirms the MX record of the recipient domain and transfers the message to another MTA (this can happen many times until the message is received by the destination server).

4) The email is given over to the MDA, which saves the message in the correct format for retrieval by the receiving MUA.

5) The receiving MUA requests the message from the MDA via POP3 or IMAP.

6) Lastly, the email is delivered to the receiving MUAs inbox.

Using MIME to send attachments

SMTP is a very reliable protocol, but it is constrained to sending text only. This would make email very limited as we wouldn't be able to send any attachments. This is where MIME comes in.

MIME stands for Multipurpose Internet Mail Extensions. This is an extension to SMTP that allows users to send different kinds of files over the internet, such as audio, video, images, application programs, etc. It also allows for non-Latin characters and emails that contain multiple parts (such as an email with a plain text element and an HTML element).

SMTP Authentication

Another extension to SMTP is SMTP Authentication. This enables email clients to authenticate when connecting to an SMTP server using a username and a password. This prevents unauthorised users from sending email through an SMTP server.

Featured Resources

Unlocking collaboration: Making software work better together

How to improve collaboration and agility with the right tech

Download now

Four steps to field service excellence

How to thrive in the experience economy

Download now

Six things a developer should know about Postgres

Why enterprises are choosing PostgreSQL

Download now

The path to CX excellence for B2B services

The four stages to thrive in the experience economy

Download now

Most Popular

Microsoft is submerging servers in boiling liquid to prevent Teams outages
data centres

Microsoft is submerging servers in boiling liquid to prevent Teams outages

7 Apr 2021
How to find RAM speed, size and type

How to find RAM speed, size and type

8 Apr 2021
University of Hertfordshire's entire IT system offline after cyber attack
cyber attacks

University of Hertfordshire's entire IT system offline after cyber attack

15 Apr 2021