Back to main menu

Deliverability

What is SMTP relay, how does it work, and why use it?

There are a lot of components to SMTP and they can all feel quite complicated. Discover why SMTP relay is the workhorse of email delivery, and how it works to ensure your messages transmit through cyberspace without a hitch.

PUBLISHED ON

PUBLISHED ON

Remember relay races in school? Just as runners pass along a baton, an SMTP relay passes along an email from one server to another. Sinch Mailgun’s free SMTP relay service helps you win the race for both transactional email and email marketing campaign delivery.

Looking to increase email delivery rates? Read on to see if SMTP relay is the answer.

What is SMTP?

Even though it may seem that emails are sent and received instantaneously, email communication actually involves a number of steps. Components – including the client, server, and mail agents – all have to work together for the system to run smoothly.

SMTP stands for “Simple Mail Transfer Protocol”. It’s all about outgoing email. Well-known email clients such as Gmail, Outlook, Yahoo, and Apple Mail all rely on this protocol to move messages from an email client to an SMTP server. This server then ferries emails to a receiving email server before the message reaches its final recipient.

By setting the rules between servers and computer networks, SMTP plays an important role in this ubiquitous communication channel. When you send an email, the email client (such as Gmail) “talks with” the SMTP server of your email provider. The SMTP server then pushes the email to the recipient's SMTP server, allowing their email client to retrieve it from there.

What is SMTP relay?

While SMTP and SMTP relay are obviously closely related, it’s important to understand the difference between them. SMTP is the protocol for transferring outbound mail while SMTP relay is the process of transferring outgoing mail. SMTP relay may also be referred to as an email relay or a mail relay.

An SMTP relay is required if the recipient's SMTP server is on a different domain, which is signified by the portion of an email address that comes after the @ symbol. For example, an email sent from one Gmail.com address to another Gmail address happens on the same domain name while an email sent from a Gmail address to a Yahoo address must cross over to a different domain.

By using SMTP relay, you can transmit emails between SMTP servers hosted on different domains without modifying the messages in any way. All headings, formatting, and content stays intact during the transfer. SMTP servers also use SSL or TLS security protocols to encrypt email communication to ensure security during the emails’ journey.

How does SMTP relay work?

An email communication system that uses clients, servers, protocols, and relays operates like the virtual post office of the internet.

Think about the traditional, physical postal service – or if you want to make it more fun, the old school pony express. When you want to send mail to a friend, you place a letter in an envelope, and put the envelope in a box. A postal worker then picks up that letter and brings it to a central location. A truck or plane (or a horse) then delivers the letter from your central location to your friend’s central location, where a local postal worker picks up the letter and brings it to your friend’s mailbox.

When you want to send an email to your friend instead, your email is placed in a virtual envelope and sent to an SMTP server on your domain, which is like your central location. If your friend’s domain or central location is different, SMTP relay operates like the plane or truck in the snail mail example, transporting your email between SMTP servers on different domains.

Learn more about SMTP and how SMPT ports help direct and manage message delivery in our post on which SMTP port to choose and why.

Learn more about SMTP and how SMPT ports help direct and manage message delivery in our post on which SMTP port to choose and why.

What are the types of SMTP relay services?

The two main types of SMTP relay services are open relay and closed relay.

An open relay is also known as a public SMTP relay. It’s a mail server that allows anyone on the internet to use it. In the early days of email, open relays were more common and relays were often set to “open” by default.

Today, however, open relays are considered a security risk, and most organizations see open relays as improperly configured SMTP servers. Since no authorization is required on open relays, spammers, bad actors, phishing scammers, and malware distributors can easily conduct their cyberattacks.

How do you test your SMTP relay server?

You can test your SMTP relay server using a few different methods. All of them are fairly simple and can confirm whether or not your system is configured properly and if it’s secure.

Conduct an overall check

The first general way to test your SMTP relay is to simply send an email, watch its journey, and confirm that it’s properly delivered. Here are the steps:

  1. Check SMTP server settings: First, ensure that you have the correct SMTP server settings configured in your email client or application. These settings usually include the server address, port number, and authentication credentials.

  2. Send a test email: Compose a test email and send it to a friend or a colleague, ideally on a different domain. Make sure to check for any bounce-back messages or errors indicating delivery issues.

  3. Monitor delivery: Keep an eye on the delivery status of your test email. You can use email tracking tools or check your email client's sent items folder to confirm that the email was successfully delivered.

  4. Verify receipt: Once the test email reaches its destination, ask the recipient to confirm receipt. If they received the email without any issues, congratulations! Your SMTP relay server is up and running smoothly.

Use free internet tools

Many free tools are available online that offer functionality to test your SMTP server or relay. We offer a great one that’s built to help you scale.

Learn more about SMTP with Sinch Mailgun

Free SMTP relay service

Particularly for growing businesses, you want access to powerful features, real-time analytics, and the ability to scale as both your email marketing and outgoing mail multiplies. That flexibility is at the core of Mailgun so as your business and marketing campaigns evolve, your free SMTP service doesn’t have to change.

Here are a few other options:

Run a manual test

If you prefer to conduct a manual test from the command prompt, you can make a ping request to the IP address of the SMTP server you want to test. If the SMTP server responds, you know it passes the test. If the ping request does not respond, it’s possible that the SMTP fails the test. However, some servers block ping requests, so you may want to telnet the SMTP server to confirm.

Check if you have an open SMTP relay; if so, close it

Finally, if you want to conduct an open relay test, telnet to the server and use commands to send a test email to another domain. A 250 response code with no request for authentication indicates an open SMTP relay.

In most cases, organizations will want to close the SMTP relay for security purposes. Contact the administrator of your email system, whether that be an internal IT professional or a third-party provider, and request that the email server is reconfigured to allow only authorized IPs and domains to send emails. Additional authentication and security protocols are often used with SMTP and SMTP relay services.

Should I use SMTP or API?

While both options strive to keep email delivery rates high, the key difference between SMTP and API is in their approach. As we’ve discussed, SMTP is the set of communication rules that allow you to send an email across servers. In some cases, you can also use an email API, which is a window used to communicate code between different applications or platforms. Making the choice for your organization will depend on your resources and needs.

Although using an email API can speed up the process, decrease potential failures, and boost security, it does require development skills and resources to manage frequent updates and modifications.

SMTP, on the other hand, is more broadly used and doesn’t require any coding. However, it can require significant server communication and tasks such as mail merging can be complicated and time-consuming.

In general, an API is a good choice if you have resources and want the ability to do a great deal of customizations, automations, and tracking for your email campaigns. It also offers improved performance if you send a large volume of promotional emails. On the other hand, if you’re looking for a simple solution that’s a universal standard, SMTP fits the bill. Since SMTP is platform-independent, it can also seamlessly connect to popular solutions like CRM platforms and migrate easier for future growth and scalability.

What are SMTP relay services?

If you don’t have the internal IT resources to manage SMTP relay, you may want to consider SMTP relay services. A third-party provider can help you significantly reduce your technical overhead when it comes to SMTP relay tasks, which frees your team up for mission-critical work.

When you use a third-party SMTP relay provider, an SMTP relay carries your outgoing email messages to an SMTP relay server that’s managed by an email service provider (ESP). At this point, the SMTP delivers email messages to the recipients’ mailbox providers.

When to use an SMTP relay service

So when exactly should you opt for an SMTP relay service?

  1. You need some help with deliverability: Third-party SMTP services can provide a boost in your email deliverability. If your sender reputation is suffering, you’ll need to do more to your email infrastructure than just opt for an SMTP relay service, but it’s definitely helpful.

  2. You can’t integrate your app with an API: If you’re using applications developed by a third party, it may not be able to integrate with an API.

  3. You’re not sending large volumes of emails: An API is much more efficient when sending bulk emails to large lists. If your volume is relatively moderate, an SMTP relay may do just fine.

  4. You’re looking for something easier to set up and manage: SMTP relay, especially if you opt to work with a third party SMTP relay service, requires less technical knowledge and can save significant resources. You can begin improving your email sending efforts more quickly if you opt for this route.

Try Mailgun’s cloud-based SMTP relay service for free

If you’re ready to improve the way your email is sent, it’s time to consider Mailgun’s free SMTP relay service. Our cloud-based SMTP relay service provides:

  • Email verification services: We validate your mailing list to keep your email deliverability high. Be sure your emails get to their intended location.

  • Real-time email tracking and advanced analytics: We all know that data is the new gold, and we’re ready to mine it for email. With our analytics, you can track sent emails, bounce rates, customer engagement rates, open rates, click-through rates, and other helpful metrics.

  • Detailed logs: If something goes wrong when you’re sending your emails, it’s important to know what happened so you can resolve the issue. We provide detailed logs to help you diagnose and circumvent email delivery failures.

  • Deliverability features: With our Mailgun Optimize suite of deliverability tools, we’ll help you minimize bounce rates and spam complaints.

At Sinch Mailgun we try hard to provide the tools and knowledge sources you need to be a great sender with strong deliverability. But topics like SMTP prove how complex that actually is. Sometimes it helps to have some smart email geeks guide your way. Check out our Free SMTP relay service and reach out to our team to help you navigate the email realm.

Learn about our Deliverability Services

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%.

Related readings

What is SMTP and how does it work?

SMTP, though a pillar of email delivery, often gets lost in the jumble of tech terms and acronyms. But if you're ready to send impactful emails, this is one of those acronyms that...

Read More

Which SMTP port should I use? Understanding ports 25, 465 & 587

It's a common question that we receive here at Sinch Mailgun about SMTP port numbers. To ensure connectivity to our Simple Mail Transfer Protocol (SMTP) endpoint, Mailgun...

Read More

SMTP: Exploring port 587

When it comes to email delivery, not all SMTP ports are created equal. While port 25 might be the oldest port in the book, and port 465 had its moment in the sun, it's port 587 that...

Read More

Popular posts

Email inbox.

Email

5 min

Build Laravel 11 email authentication with Mailgun and Digital Ocean

Read More

Mailgun statistics.

Product

4 min

Sending email using the Mailgun PHP API

Read More

Statistics on deliverability.

Deliverability

5 min

Here’s everything you need to know about DNS blocklists

Read More

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon