What Is Mailtrap and Why We Use It

When it’s time to send emails that seem mysteriously ingurgitated by a black hole, you need to take control of the many steps involved in an email delivery from WordPress.

Without entering the details, you should start by checking if the missing email has been generated and “sent”. 99.9% of the time, and we have seen hundreds of cases, everything is working correctly in your blog and it’s the provider dropping, missing, filtering, blocking, scrambling, modifying your emails.

Here the Mailtrap service comes very handy. It works like an SMTP service and gives you a username and a password (later we see how to use them). Once connected with your blog, ALL emails sent using WP are captured and shown on a console.

Not only: for each email you can see a preview, desktop and mobile version, have a little analysis of the content (compatibility with several email clients), and get the source and other technical information.

But, overall, you can see your blog or plugin is actually sending the emails! So, the next step is to ask your provider why it’s dropping your communications.

A note: we know the majority of hosting providers do not suffer from that problem, but when it happens you (and us) have a hard time finding the problem and getting support.

How to use Mailtrap on a WordPress site

Mailtrap is an SMTP service so you need one of the many SMTP plugins. You can count on WP Mail SMTP or FluentSMTP, we tried both with success. But, generally, every SMTP plugin should work.

If you’re able to copy (actually just able to copy and paste…) here is how you can connect your WP to an SMTP in 10 lines of code!

What you need from Mailtrap is just some parameters: username, password, host, and port and the tests can start!

Pay attention to… do not forget the connection to Mailtrap when you finish the tests otherwise no one will receive the emails!