What Protocol Is Used to Send Email Messages From a Mail Client to a Mail Server
We send emails to i another all the time—a whopping 306.4 billion emails are sent and received every day. Information technology's one of the most common advice methods for businesses and individuals alike, only have you ever stopped and wondered what goes on later on you click "send"? How does your message go from you lot to your recipients?
In that location'south a complex procedure going on behind the scenes to get your emails where they demand to exist. At the middle of information technology all is an email protocol known every bit SMTP that's critical for sending emails… and you're about to acquire everything y'all need to know virtually it.
What is SMTP? #
SMTP, which stands for Simple Mail Transfer Protocol, is an e-mail protocol used for sending email letters from one electronic mail business relationship to another via the internet.
E-mail protocols are sets of rules that let different email clients and accounts easily commutation information, and SMTP is ane of the most mutual ones alongside POP and IMAP. It is also the but dedicated protocol for sending emails. Most email clients—including Outlook, Apple Mail service, Gmail, and Yahoo Mail—rely on SMTP to "push button" or send messages from a sender to a recipient.
What is an SMTP server? #
Like all servers, an SMTP server is an awarding that provides a service to other applications within a network, called clients. Specifically, an SMTP server handles the sending, receiving, and relaying of e-mail.
You tin can think of servers as your existent-life post offices. When you transport a letter from city A to urban center B, it offset reaches a local mail office in urban center A; hither, it gets processed and sent on the post role in urban center B, which is in charge of delivering it to its concluding destination.
The same happens with SMTP servers—though instead of taking days, the process takes a few minutes at well-nigh.
You might have also come across the term SMTP port. Those are the communication endpoints that handle the transfer of email data over SMTP as it moves through a network, from 1 server to another. We cover those in detail hither.
How does SMTP work? #
The best manner to explicate how SMTP works is to go over the sending process, the individual rules and commands that power it, and the errors you may encounter. Off-white alert: This is where things start to get technical. Still, nosotros'll do our best to condense this protocol downward into easy-to-digest chunks.
Once an SMTP server is established, electronic mail clients tin connect to and communicate with it. When the user hits "transport" on an email message, the email customer opens an SMTP connection to the server so it tin can ship. (The SMTP connectedness is built on something called a TCP connection, which stands for Transmission Control Protocol.)
From there, the SMTP client uses commands to tell the server what to do and transfer data, like the sender's email address, the recipient's email address, and the email's content. The Mail Transfer Agent or Message Transfer Amanuensis (MTA) checks to meet if both e-mail addresses are from the same email domain, such as gmail.com:
- If they are, it sends the email right away
- If not, the server uses the Domain Name System (DNS) to place the recipient's domain and and then send it to the right server.
You don't need to get into the weeds of SMTP to start sending emails. Postmark's SMTP email service can handle it all for you and getting started is equally simple as copying some credentials into a config file.
Learn more →
Basic SMTP commands #
Every bit we mentioned earlier, SMTP commands are a ready of codes that power the manual of electronic mail messages betwixt servers. Here are the basic SMTP commands you should exist aware of:
- HELO or EHLO (Hello): This is a crucial control for beginning the unabridged email sending procedure. The electronic mail client is identifying itself to the SMTP server. Information technology is the beginning of a conversation and usually involves the server sending a HELO command back consummate with its domain name/IP address.
- Mail service FROM: Following the identification command, the sender will share code that specifies who the postal service is from. This outlines the email address and tells the SMTP server that a new transaction is about to start. From hither, the server resets everything and is ready to accept the electronic mail address. Once accustomed, information technology will answer with a 250 OK respond code.
- RCPT TO (Recipient To): The next control follows the 250 OK answer lawmaking identifying who the electronic mail is existence sent to. Once more, the SMTP server responds with the same lawmaking, at which betoken another RCPT TO control can exist sent with a different recipient's email address. This can get back and along as many times as required depending on how many people will receive the email.
- Information: This triggers the transfer of data between the customer and the server. All of the message contents will be moved to the SMTP server, which volition respond with a 345 reply code. The contents of the messages are transferred to the server, where a single dot is sent in a line by itself to signal the end of the bulletin. If accepted and ready for delivery, the server sends another 250 OK code. At this point, the message is on its way to the recipients.
- QUIT: When the email has been sent, the client sends the QUIT control to the server, severing the connection. If it has been successfully airtight, the server will reply with a 221 code.
- RSET (Reset): This command is sent to the server when the mail service transaction needs to be aborted. It doesn't shut the connection, but it does reset everything and remove all previous information about the electronic mail and the parties involved. Y'all will commonly use this when there has been an mistake, like inputting the wrong recipient information, and the process needs to be restarted.
Motion-picture show these commands every bit the linguistic communication that allows email servers to have a conversation with each other. Their chat will look somewhat like this:
In that location are other SMTP commands that handle authentication and raise security, such as AUTH and STARTTLS. If you're interested in learning nigh them or seeing examples of SMTP at work, read this guide to SMTP commands.
Understanding SMTP mistake codes #
The email sending procedure doesn't e'er go as smoothly as in the example chatter of our email servers above. Bounces, blocks, or other issues might prevent an email from being sent. In this case, the receiving server can notify y'all of issues using SMTP error codes, and knowing what they mean helps yous diagnose and ready e-mail delivery roadblocks.
For example, here are two groups of SMTP errors that crop up often:
- iv.X.X Persistent Transient Failure: These error codes outset with the number "4" followed by two other numbers. They typically mean that at that place's a temporary failure with the mail server. Repeating the control again could get rid of the error, merely these codes are oftentimes used by servers to go along untrusted senders at bay.
- 5.10.10 Permanent Error: These error codes begin with the number "five" and are followed past two numbers. They typically signify that the SMTP connection has dropped. If you lot try to resend the email, it will likely still result in the same error.
PS: if you're interested in learning more nigh SMTP errors, hither at Postmark we started a public SMTP Field Manual to certificate the error codes we come across most oft. Check it out! You can even contribute your ain entries if you lot've spotted an SMTP fault we haven't encountered before.
How is SMTP unlike from other electronic mail protocols? #
Bandage your mind dorsum to the definition of SMTP, and you'll remember we said that it was 1 of many electronic mail protocols. POP and IMAP are the other two most common electronic mail protocols in use.
The main divergence between these protocols is that SMTP is the only protocol for sending or "pushing" email from one unknown postal service server to another. Pop and IMAP are protocols for receiving or "pulling" mail for the recipient from their ain postal service server. And so, POP and IMAP limit the transfer of mail to verified mail servers only. They can't exist used for communication outside of your own networks.
Below, we'll give you a deeper explanation of how Pop and IMAP piece of work and how they differ from SMTP.
POP #
POP stands for Post Role Protocol, and information technology'southward used to receive incoming messages. The nearly current version is POP3, last updated in 1988.
This protocol gets its name because it operates like a real-life postal service function in the digital realm. POP3 will receive emails and hold them for clients until they pick them up. All emails are downloaded and stored locally, making it a handy solution for someone who only uses 1 computer to cheque emails. It's also commonly used by businesses and then employees can bank check emails while offline.
How do Pop and SMTP differ?
- SMTP is a message transfer protocol, while POP is a message access protocol. In other words, SMTP is used to send postal service from one user to another, while Popular is used to receive emails.
- SMTP is used twice: In one case when establishing the connexion and sending information between the sender and the email server, and a 2nd time when sending information and connecting to the recipient. Popular is only used once between the receiver and their mail server.
IMAP #
IMAP stands for Internet Bulletin Access Protocol. In short, IMAP stores messages on an email server, merely this server can exist accessed by the user to check and configure their emails. The difference betwixt this and POP is that IMAP uses a cloud server and then emails tin be authenticated and categorized by any device. Many email users prefer IMAP to Pop because of the convenience and efficiency.
If yous've ever set your ain email client, y'all probably encountered IMAP on an interface similar this one:
How practice IMAP and SMTP differ?
- SMTP is a message transfer protocol, while IMAP is a message admission protocol (like POP). So while SMTP sends messages and handles outgoing electronic mail, IMAP only retrieves messages and handles incoming email.
Running your ain SMTP server vs. using a third-party e-mail service: What's best? #
When it comes to setting upward and using an SMTP server, there are two main options:
- Run information technology yourself
- Use a tertiary-party service
What'southward the best option? There'south no black-and-white respond, as it all depends on your needs and resources. Below, we'll take a look at both and highlight the pros and cons of each and so y'all can determine which path to go down.
Running your own SMTP server: Pros and cons #
What sort of advantages or disadvantages can you see from setting upwards and running your ain SMTP server? Here's an overview, plus a bonus stride-by-step guide to SMTP setup and hallmark for a more than detailed rundown.
- Pro: No sending volume limits. Many email service providers and internet service providers (ISPs) limit your daily emails, as do some web hosts. When yous have your ain dedicated SMTP, y'all can transport equally many emails equally y'all need on an hourly or daily footing.
- Pro: Fully monitor email commitment. No matter what happens to your e-mail later you hit send, y'all will receive helpful delivery information. Y'all tin can see if your messages were sent to the recipient and examine whatever error codes.
- Pro: Your email list is private. Another advantage of running your own SMTP is that you don't have to share e-mail listing data with anyone, maintaining your company's and your customer's information privacy.
- Con: Tin take more fourth dimension, money, and effort. Running an SMTP server requires a lot of resources: you'll constantly need to monitor that everything is upward and running, and may fifty-fifty need to rent a dedicated specialist or team—and that'due south after you set up the server itself, which is a whole other story. For many businesses, this is simply too costly.
- Con: It'south local. Another disadvantage to running your own SMTP server is that it's local, then it will be vulnerable to power outages or net connectivity issues in your area. You can set up backup servers and failsafe protections, but once again, this requires technical know-how.
- Con: You might experience deliverability and security issues. Unless sending to specific/limited receivers, information technology volition take time to get the deliverability merely correct, especially when your email volume changes. Plus, yous'll have to protect your electronic mail server from unauthorized access and spam—and that can be a real challenge. That'due south the big advantage of using a tertiary-party service: they already accept all of that stuff figured out, and have specific processes for detecting when adjustments are needed.
Speaking of which...
Using a third-party email service: Pros and cons #
Now, admittedly we are going to be a flake partial here, because at Postmark we exercise run a super-reliable e-mail platform that you tin can use to evangelize electronic mail via SMTP. This said, we also know that Postmark and other third-party services are not for everyone—so here is a listing of the advantages and drawbacks of opting for a third-party electronic mail service.
- Pro: Significantly less hassle for you. Using a tertiary-party email provider takes intendance of everything for y'all. You don't need to have pregnant technical knowledge or spend time maintaining and monitoring your email server, and you tin often tap into technical support to help with whatsoever issues.
- Pro: More secure. Well-nigh third-political party providers offer multiple backup options to keep your emails condom if i server goes downwardly. They besides keep their security in line with the latest industry standards, ensuring your data is safe and secure at all times.
- Pro: More price-constructive. Paying for a service that you'll use all the time means you never have to bargain with email servers yourself. This tin can salve your business organization time and money, since you won't need to employ anyone to monitor and maintain your server or spend money fixing deliverability and security issues.
- Pro: More reliable deliverability. 3rd-party services have long-continuing relationships with ISPs and mailbox providers, are experienced when it comes to solving issues and adjusting to the unique requirements of diverse receivers, have all of the monitoring and delisting processes in place, and of grade have plenty of deliverability experts on staff—so y'all don't have to worry nigh any of it.
- Con: Reliant on others. One of the only drawbacks to using a third-party SMTP setup is that you lot have to rely on another company if you run into problems with your e-mail server. So if you become downwardly this route, make sure to pick a service and team with great domain expertise—and who brand great client back up a priority.
Pro tip: yous can bank check the reputation of your provider on review sites like G2 or by checking out conversations on Twitter and other social channels. Real feedback from actual product users might requite you a good thought of what to expect.
Aww. Thanks Val. 💛
- Con: Dealing with third-party terms and conditions. Finally, you'll have to abide by the provider'southward terms of service (TOS), which could include limits on the number of emails you tin send. That said, it's rare to notice a TOS that volition significantly reduce or impact your sending book, whether information technology'southward transactional electronic mail or promotional email.
Overall, opting for a third-political party email service is the easiest and most reliable manner to get for most businesses. It equals fewer risks and fewer headaches, allowing you to focus on your electronic mail strategy and send emails without worrying about the technical side of things.
Choose an email service y'all can count on #
Hither'south the bottom line: The world'south email runs on SMTP, and while you tin definitely set up your own SMTP server, it may end upward being a bigger challenge than it needs to exist—particularly if y'all accept no prior cognition of the inner workings of email protocols, don't have a lot of resource, and are concerned about security. And even though here at Postmark we're all excited almost designing the perfect e-mail infrastructure, nosotros understand that about normal humans would rather not deal with it.
Most of the time, finding a 3rd-party email service is the best bet, and if yous choose Postmark you'll have an email service you can truly count on. Our SMTP servers are distributed around the world, giving yous access to easy and secure email delivery at all times. And because we accept serious street cred with inbox providers, nosotros're getting your emails delivered fast and reliably.
The best SMTP providers: A side-by-side comparing #
Looking for the all-time SMTP email service for your business organisation? We compare features, costs, and platonic use cases of pop tools and share a handy comparing sheet that might help y'all as you do your research.
Ready to start sending?
Sign up for Postmark today and relish a complimentary trial on united states.
Start a gratuitous trial → No credit menu required
Acquire more about SMTP sending with Postmark:
- Postmark user guide: Sending email with SMTP
- How to transport from Outlook using SMTP
Source: https://postmarkapp.com/guides/everything-you-need-to-know-about-smtp
0 Response to "What Protocol Is Used to Send Email Messages From a Mail Client to a Mail Server"
Post a Comment