Site icon Mailtrap

How to Test Emails in Mandrill, Sendgrid, and Mailgun

In our previous post, we reviewed Sendgrid, Mandrill, and Mailgun – the most popular email sending services. “Test your emails before actually sending them”: each of them repeats this mantra, as does anyone who deals with email development. But do these services offer enough options for quality email testing? Let’s have a closer look at the checkpoints and see if there is a need for a special testing service.

Sendgrid test

Sendgrid offers sandbox mode and sink email addresses for email developers.

  1. Test the API integration in the sandbox mode. In Sendgrid, it’s a mail_settings parameter, which helps validate email sending requests. Sandbox mode allows checking the parameters of your JSON payload. If any errors were found, it returns their detailed description. You can find more information and examples in Sendgrid documentation. It doesn’t affect any of the real sending parameters.
  2. Check the email sending speed. This option can be useful for preparing large bulk email campaigns. Sendgrid has a “black hole” domain @sink.sendgrid.net. It will accept all the messages and immediately remove them. If you have a dedicated IP address, this type of test won’t affect its warm up. However, all emails sent to this domain will be counted as billable.

Mandrill test

The testing mode in Mandrill offers a more extensive list of features: test API, test stats, and webhooks testing.

  1. With the test API key, you will be able to verify your integration and explore its capabilities. As no actual email sending occurs, it affects neither your monthly limits nor your account reputation.
  2. In Mandrill’s test mode, you have access to your test stats. Also, you can view and check email subject, sender and receiver email address as well as the message content.
  3. Another interesting feature is webhooks testing. Mandrill provides you with the list of specific email addresses. You can use them to send a message for testing such events as bounces, rejects, and spam complaints.

Read more about these options in the Mandrill knowledge base.

Mailgun test

Mailgun features a very simple test mode and an email verification tool.

  1. To launch the test mode, you should simply set the o:testmode parameter to true. It will help to test your integration as well. Note that Mailgun charges you for the messages sent in this mode.
  2. Email verification tool is a specific feature in Mailgun. It is useful for bulk email campaigns. The tool will check all email addresses in your list to identify invalid ones. It helps to decrease hard bounce rate, which has a negative influence on your sending reputation. Note that email verification is a separate limit, not included in the email sending volume.

Universal Email Testing Checklist for Developers

Each of the mentioned email services recommends running a series of tests before sending either transactional or bulk emails.  See below the list of checks that you can perform for any type of email or framework.

1. Testing the email sending capability. It is actually where you check if your code works.

Check if your script is able to send messages in general. As a rule of a thumb, separate production (real) email sending from staging or sandbox testing. You don’t want your tests to reach your customers or affect your domain reputation score.

2. Content testing. Regardless of the method you use to compose your message, there is a chance that your input will differ from the output – the message your user will see in the end.

3. Spam testing.

In addition, you can share the testing results with your team members or even forward your message to your inbox for preview.

To get the full list of checks, refer to our Email Testing Checklist article.

Test Your Emails Now

Tools and Options for Email Testing

It would be perfect to have an all-in-one tool for email development, testing, and sending. Yet, each service has its particular focus, and the combination of tools proves to work better. Here is what you can do to perform content and spam checks.

Probably, the first thing which comes to mind is creating several testing inboxes for some most popular email clients like Gmail, AppleMail, Outlook, or Thunderbird. It will let you instantly check the delivery speed, see in which folder your message is landed as well as review the content and how it is rendered. Also, you can open the email from your smartphone and/or tablet.

In general, setting up test accounts in several webmail services and/or email clients can bring you good results. But it will work best if you only occasionally need to test new templates. Otherwise, you will be overwhelmed with maintaining all those mailboxes and cleaning test messages. In addition, this is production testing, so it will affect your monthly credits and sending reputation. All these factors don’t come in handy when you need to test bulk message sending with dynamic content and localization.

There are a bunch of tools that can offer you a dedicated inbox for testing along with options for content preview. They eliminate the need for handling various testing inboxes but still work in the production environment.

Pre-production email testing with Mailtrap

It’s undoubtedly a best practice to separate development and production. For testing the email sending functionality it’s a must.

The main purpose of pre-production email testing is to eliminate the risk of spamming real customer inboxes with testing messages. The staging environment should emulate production as closely as possible. For this purpose, it often contains an email database of real recipients. For example, recently the US embassy in Australia sent out a fake meeting invitation featuring a pyjama-wearing cat.

Yes, we are really serious about email testing. With all the above in mind, we created Mailtrap. It is a fake SMTP server, which distributes your email experiments to the virtual inboxes. It can help you to perform:

  1. Testing of the email sending capability. You just replace SMTP configuration with Mailtrap credentials and instantly get all your messages in its virtual inboxes.
  2. Content testing. Mailtrap demonstrates how the HTML will be rendered in a web browser and shows if any issues might occur in specific email clients. Also, you can separately check the HTML and text parts, view how the message will be displayed on different devices, and check attachments.
  3. Spam testing. Mailtrap performs spam check and provides recommendations on how to decrease spam score. Also, it scans commonly used blacklists to check the used IP and domain.

Try Mailtrap for Free

Email Testing Outcomes

The email sending providers offer quite limited testing capabilities. What is more important, they hardly allow users to separate email sending from development and production environments. Instead, some of them feature third-party apps, which can help you with testing.

Your testing workflows may vary depending on the current tasks but all of the three main steps need to be included:

Whichever tool you use, pre-production testing will help you avoid many common email mistakes. Create a free Mailtrap account in three clicks and enjoy peace of mind when preparing your email campaigns.

Exit mobile version