Any digital marketing plan depends on email. Deciding on the right way to send your emails can be difficult. Should you choose SMTP or use Web API instead? Which approach is more advantageous to you and when should you prefer one over the other? This comprehensive guide breaks it all down.
What is SMTP?
SMTP refers to the Simple Mail Transfer Protocol, a vast set of rules governing the process of submitting and transferring emails. For the sake of this article, we are discussing the use of an SMTP server – a computer with the necessary software to perform email transfers.
You may set up your own SMTP server in-house or use one provided by one of the many email service providers (ESPs). Many ESPs offer extra features with their SMTP server plans, beyond the capabilities outlined by the protocol specification.
When talking about sending email via SMTP, we mean communicating with a particular SMTP server using the standard SMTP protocol. Using an API implies an extra layer between your app and an ESP’s infrastructure (which usually includes multiple SMTP servers working in parallel).
How is SMTP used for sending emails?
To send emails via SMTP, you need access to an SMTP server.
Besides an in-house solution, the most common ways digital marketers use SMTP are:
- Through an email service provider (ESP): For example, Mailchimp, Mailtrap or Campaign Monitor. Popular ESPs provide access to their SMTP servers to send email newsletter and campaigns.
- Through G Suite or Office 365: If you’re using Gmail or Outlook for your business email, you can send emails using their native SMTP servers.
- Through your website host: Many shared hosting providers offer access to SMTP servers to send transactional emails from your website, though the volume is usually limited.
Once you have access to an SMTP server, you configure your email client, app, or website and start sending emails via those servers. Your email client or app will use the SMTP protocol to submit the emails to the SMTP server, and it will then relay the emails to the destination mail server where the emails are put into the recipients’ mailbox.
Pros
- very easy to set up and use
- allows you to scale email delivery by using third-party ESPs
- easy to migrate between ESPs
- provides error codes for easier troubleshooting
Cons
- lacks advanced features like email tracking and analytics
- email must be fully composed on the user’s side
- slow for high email volumes
So, in summary, SMTP provides an easy way to send emails but lacks speed and flexibility.
Next, let's look at API and how it differs from SMTP.
What is an email API?
API stands for Application Programming Interface. In simple terms, API is a software interface that enables two applications to interact with each other.
An email API allows your website, app or business software (CRM, ecommerce platform etc) to integrate with an email delivery platform to send and manage emails programmatically.
For instance, if you’re an ecommerce store, you can use an email API for developers to automatically send order confirmations or shipping notifications to customers whenever corresponding events happen.
Here is how an email API interacts with an email-sending service:
- The email platform provides an API endpoint which your app uses to make API calls that contain all email details, usually based on the HTTP protocol.
- The API requests are processed by the email platform, the email is assembled and delivered to recipients.
- Advanced platforms go a step ahead by giving you the ability to track opens, clicks, unsubscribes etc via webhooks.
In technical terms, email APIs are REST or SOAP-based Web APIs configured to send and track emails at scale.
Leading email platforms like UniOne, Mailgun, SendGrid, Mailjet and others provide a developer-friendly mail sender service that makes it easy to integrate email functionality into web and mobile apps.
What are email APIs used for?
Email APIs power the email-sending capabilities of most modern applications. Here are some common examples:
- Transactional email: Email APIs facilitate automated emails triggered by certain user actions, such as signups, purchases, content downloads, etc. These automated messages are called transactional emails.
- Email notifications: Send real-time notifications for events like profile changes, orders, processed support tickets, etc that require immediate reaction.
- Workflow emails: Design multi-step email workflows to onboard customers or nurture leads without manual interventions.
- Email analytics: Use detailed insights into email campaign performance - opens, clicks, conversions, bounce rates, etc.- to further optimise content and delivery.
In essence, email APIs provide the tools to automate and fully optimise your application's email functionality.
Pros
- dynamic email content via templates and substitutions
- advanced email tracking and analytics
- scales to any email volume easily
- highest sending speed
Cons
- integration requires developer resources
- dependent on third-party platforms
- changing providers means overhauling the integration
- limited control compared to self-hosted solutions
Email APIs provide faster and more reliable email delivery compared to SMTP along with essential tracking and analytics. The trade off is the additional integration effort and dependence on external platforms.
Key differences between SMTP and email API
Now that you understand the basics of SMTP and email API, let's summarise some of the key differences. In plain English, think of it this way:
- An SMTP server is comparable to the post office's shipping department. Its main purpose is to route packages between sorting centres and deliver them to the recipient's postal address.
- Email API is like UPS or FedEx. It gives you an interface to directly hand off shipments, which are then transported using private logistics networks instead of the public postal service. This increases the reliability, speed and visibility of your deliveries.
Key takeaways and recommendations
Let's summarise the key points that will help you choose the right email delivery methods:
- Send high-volume marketing emails, such as newsletters and promotions, through dedicated ESPs using Web APIs. They give you better speeds and the analytics you need at scale.
- Include the power of email APIs in your applications and deliver transactional emails on demand to users, such as order confirmations, event notifications etc. For newly created apps, using an email API is most logical.
- For legacy applications, continue using SMTP systems. The same applies to scenarios where you may need to migrate to another service at any time.
- To boost deliverability, utilise the dedicated IPs and domain authentication available in API email providers and ESPs.
Moving from SMTP to API may require major code changes. Once you have fully assessed your requirements, the capabilities you need and future requirements, you can decide which route is right for you.
Copyright 2024. Article made possible by Julia Demianchuk.