You know what sucks? When your emails show up in your intended recipients’ spam folders. You’re sending content that needs to be seen, but the Internet gatekeepers are sending it straight to junk.
It’s annoying. But as anyone who has tried to receive Contact Form 7 emails at their Gmail account can attest to, it happens far too often with emails sent by your WordPress site.
See, that’s because WordPress, by default, uses the PHP mail function. And as a result, spam folders can eat far too many of those important emails like contact form notifications, registration details, password resets, and more.
In this post, I’ll show you how to increase the deliverability of emails sent by WordPress using something called SMTP.
What’s the Problem With WordPress’ PHP Mail Function?
If you’re lucky, nothing. PHP mail works most of the time. In my experience, it’s rare for basic WordPress notification emails to go to spam (though it does happen). Where WordPress’ PHP mail function can really break down is when it comes to sending notifications from plugins.
For example, I consistently have to set up custom filters to allow notification emails from my contact form plugin to go to my inbox instead of my spam folder.
Some hosts also limit the use of the PHP mail function. As far as I know, this isn’t a major consideration (most hosts will only limit you if you’re abusing it), but it may be a problem for some hosts.
Additionally, I’ve read about some security plugins causing issues with WordPress’ PHP mail function, though I haven’t personally experienced this.
All in all, if you’ve been having any deliverability problems with your WordPress emails, moving to SMTP offers a good chance at fixing them.
What is SMTP? Why Use SMTP for WordPress
Short for Simple Mail Transfer Protocol, SMTP is a well-established standard for transmitting emails. The main benefit you’ll see is better deliverability and reliability. Email clients like Gmail and others are less likely to view emails sent via SMTP as spam. That’s because, unlike PHP mail, emails sent via SMTP actually undergo some authentication.
You’ll also be able to set up a branded email for outgoing WordPress emails. For example, Daan could choose to send wplift notification emails from firstname.lastname@example.org. It’s a small thing, but it is nice to add a bit of personalization.
How to Send WordPress Emails via SMTP
For a long time, the standard plugin to set up SMTP for WordPress was the well-named WP Mail SMTP. As far as I know, that’s still a viable option. But it’s not what I recommend you use. Instead, I recommend a plugin called Postman SMTP. Here’s why:
- Postman SMTP includes a very easy set up wizard
- You don’t need to store your email account password details in plaintext (big no no)
- It replaces PHPMailer with Zend_Mail
- It logs all emails and send errors so that you can easily spot any problems
- Postman SMTP delivers via HTTPS if your host blocks SMTP ports
Basically, it’s an all-around better experience than WP Mail SMTP. Here’s how to use it…
Step 1: Install and Activate Postman SMTP
Get started by installing and activating the plugin. It’s available for free at the wordpress.org directory, so you can install it directly from your WordPress dashboard.
Once it’s activated, get ready to configure it by heading to Settings → Postman SMTP.
Step 2: Configure SMTP Details
A nice thing about Postman SMTP is its handy set up wizard. All you need to do to launch the wizard is click the button. Easy enough, right?
I’ll show you how to set everything up using your host’s SMTP information. But you can also use a third-party SMTP service like Gmail or SendGrid if that’s more your speed.
The first thing you need to do is enter the email you want to send emails from and the default “From” name:
Next, you’ll need to add your outgoing hostname:
To find your outgoing hostname, you need to go to your cPanel account at your host. Under your Email Accounts. Find the email you want to use, and choose Set Up Mail Client. If you haven’t already created an email account, you can do that from the same page in cPanel:
Then, scroll down to Manual Settings and find the Secure SSL/TLS Settings. Your outgoing hostname is the URL by the Outgoing Server option:
Once you enter your outgoing hostname, Postman will analyze it and (hopefully) give you a list of options to choose from:
Make sure you choose the outgoing hostname with the correct port number. You can get the port number from the exact same location in your cPanel account.
On the next page, you’ll need to enter your username and password. Again, you can find these in the same location in your cPanel. Your username is typically your email address. And your password is the password you created for your email account in cPanel.
Once you enter those details, you’re finished!
Step 3: Send a Test Email
Now’s a good time to actually make sure the setup worked properly. To do that, you can send a test email from the Postman SMTP dashboard:
If everything went well, you should receive an email at the email address you entered. As long as you get the email, SMTP is properly configured!
Bonus – that smiling cartoon is sure to put a smile on your face!
Using Postman SMTP With a Third-Party Email Service
Like I said, you can also use Postman SMTP with a third-party email service. Gmail is one popular option. You can use it to send up to ~500 emails per day – you’ll just need to generate an API key to make it work.
You can also use SendGrid, which starts at $9.95 per month.
The Postman SMTP Set up Wizard will help you set up both of these options if you need assistance.
Don’t Use This for Newsletters
While SMTP is good for improving the deliverability of your basic WordPress emails, you should not use it for newsletters. If you want to build a newsletter, you should still get a list building plugin and use something like MailChimp to send out your newsletters.
Another good option for newsletters is SendinBlue. It can integrate with your WordPress dashboard to help you safely send newsletters.
Wrapping Things Up
If you’re the sole user of your WordPress site and you’ve never experienced any issues with emails, you can probably just leave things as they are. But if you’ve ever had problems with WordPress emails going to spam, you should follow this guide to set up SMTP for WordPress and increase the deliverability and reliability of your transactional WordPress emails.
Have you set up SMTP for WordPress? Did it solve whatever issues you were facing?