- Best Practices
Email Blasts: The Dos And Many Don’ts Of Mass Email Sending
We get it – when it comes to email, certain terms can sometimes feel like word salad. This is especially true for acronyms. And this confusion can lead to problems with your sending capabilities, which leads you back down the road of confusing acronyms, and so on.
Two of the biggest can-be-confused culprits are SMTP and API. It can be hard to keep them straight, and harder to know when to use them. But no worries, we’ve got you. In this post, we’ll teach you the differences between SMTP and API, and when to use each.
We’re diving right in and tackling SMTP first. What is it, and how do you use it?
SMTP stands for Simple Mail Transfer Protocol, and it’s the method of sending email across the Internet. An SMTP server lets you use SMTP to transfer mail through a server, across a network and to its destination. Unlike most computer servers that handle multiple processes at any given time, an SMTP server is only used to send, receive, and transfer email. Mailgun acts as an intermediary to send mail via SMTP, as shown below.
As mentioned above, SMTP pretty much has one specific purpose, and that’s email. It ensures that messages are securely transferred between sender and recipient. When sending via SMTP, you may wonder which SMTP port to choose from. Port 587 is considered the default SMTP port for mail transfer, and it’s what you should use unless you’re blocked by your network or provider.
Now that we know about SMTP, let’s dive into the basics of API.
When used for email, API is similar to SMTP. However, its general purposes and abilities aren’t as specific.
API stands for Application Programming Interface and, unlike SMTP, it’s not just used for email. API is software that enables multiple applications and systems to communicate. For example, when you log into an online account, an API is what tells the account’s system that you’re trying to log on, and then it tells you whether or not the login attempt was successful.
It can be used for lots of applications, but we use it for email. In a Mailgun emailing context, if you want to send a message, you use an API to generate and queue your message.
While an API is used for lots of different applications and actions, we’ll focus on email APIs. With email APIs, a given application, like a product website, can use the API to automatically send transactional mail (like receipts and confirmations) without having to individually queue and send each one by hand.
When that product website works with Mailgun, they would add code to their relevant website applications (like signup forms and purchase windows) that send out an API alert when a triggered action needs an email sent in response. The API alert tells Mailgun to create and send specific messages to the right recipients based on data that the product website has provided – for example, email list data. Mailgun gets this information and sends the message to the right person.
All email APIs work similarly to the above example. Their purpose is to provide fast, consistent email capabilities without the hassle of using a separate provider or piece of software. To facilitate ease of use, Mailgun’s RESTful API allows developers to use their coding language of choice, rather than having to deal with the headache of finding a provider that uses their specific language.
SMTP and API both have applicability when it comes to email. However, there’s one that we here at Mailgun recommend most. Let’s take a look…
We recommend using SMTP if you’re a sender that can’t add API to your applications. This includes when you have applications that were specifically developed for you by a third party, and they can’t integrate with API. Additionally, you may have an older system or sending method that’s using SMTP – in that case, it may save you time, money, and energy to just keep using SMTP instead of trying to migrate to a new ESP. If it’s not worth it, save yourself the trouble.
A reminder: As mentioned, port 587 is generally what you should use to send email via SMTP, but you may be in need of another port if you’re blocked or otherwise have a problem with your network.
You can use SMTP for transactional or bulk email. The disadvantage of SMTP is that it tends to be slower than API – there’s a lot more “talking” between servers. This can lead to lower-performing mail sending.
We recommend using API for email in pretty much any case where you’re able to build it into your applications. Like SMTP, you can use them for bulk and transactional mail but, unlike SMTP, they have the advantage of being faster and more flexible than SMTP.
As an example, if you’re an online shopping company, you want to be able to provide relevant email receipts, shipping notifications, and other messages. Of course, you probably don’t have the time or desire to individually send these kinds of emails to your hundreds (or thousands, or millions) of customers.
With an email API, you can automate this sending and tie messages to triggered actions, similarly to the product example above. You can easily code an API to do what you want, when you want it, unlike SMTP. A purchase is made? Email a receipt. A shipping order? Automatically send a tracking number or location updates. Not only does this save you the crazy hassle of having to do all of the manual updating and sending yourself, but it also streamlines your service lifecycle and strengthens your customer relationships.
When your customers automatically get the confirmations and receipts they want, they have more confidence in you and are more likely to return for more business. Any type of message or notification that lessens friction in your customers’ journeys is a huge benefit, and an email API is a great way to keep these messages on track without fuss.
SMTP and API can be confusing, but they both have distinct definitions and best times for use. Here’s what you should remember about both:
SMTP (Simple Mail Transfer Protocol) involves, as its name suggests, mail transfer. You should use it for email sending when you have applications that don’t allow for API functionality (and make sure you use the right port).
Email API (Application Programming Interface) allows consumer actions to automatically trigger emails. We recommend using it to get faster messages and more flexible capabilities.
Now that you know a little more about SMTP vs. API, go forth and email with confidence. You’ll know what method is right for you, and you’ll have two less acronyms to worry about.
Learn about our Deliverability Services
Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%.
Last updated on May 04, 2021
Email Blasts: The Dos And Many Don’ts Of Mass Email Sending
How to Improve Holiday Supply Chain Communication with Email
What Is a RESTful API, How It Works, Advantages, and Examples
How to Improve the Way WordPress Websites Send Email
Email’s Not Dead Season 3 Is Finally Here
Easier and Faster Implementation with Our Updated SDKs
The Basics of Email Dark Mode
COVID-19 Survey: How the Pandemic Has Affected Email Sending
The Top Email Clients and Email Apps of 2021
The Benefits of Email Automation
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Become an Email Pro With Our Templates API
Google Postmaster Tools: Understanding Sender Reputation
Navigating Your Career as a Woman in Tech
Implementing Dmarc – A Step-by-Step Guide
Email Bounces: What To Do About Them
Announcing InboxReady: The deliverability suite you need to hit the inbox
Black History Month in Tech: 7 Visionaries Who Shaped The Future
How To Create a Successful Triggered Email Program
Designing HTML Email Templates For Transactional Emails
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Implementing Dmarc – A Step-by-Step Guide
Announcing InboxReady: The deliverability suite you need to hit the inbox
Designing HTML Email Templates For Transactional Emails
Email Security Best Practices: How To Keep Your Email Program Safe
Mailgun’s Active Defense Against Log4j
Email Blasts: The Dos And Many Don’ts Of Mass Email Sending
Email's Best of 2021
5 Ideas For Better Developer-Designer Collaboration
Mailgun Joins Sinch: The Future of Customer Communications Is Here
Always be in the know and grab free email resources!
By sending this form, I agree that Mailgun may contact me and process my data in accordance with its Privacy Policy.