Improve WordPress Email Deliverability

WordPress Email Problems?

Are you having any of these email problems with your WordPress website?

  • Emails not sending
  • Emails going to spam
  • Emails not going through
  • Emails slow

One of the first things you should do when setting up a new WordPress site is set up a system where emails will be delivered reliably.

If you’re collecting information from users, receiving notifications, or sending transactional emails through your website, it’s important that these emails get delivered properly.

Unfortunately, most WordPress users set up their site without thinking about this important function of their website.

Imagine getting a call from an angry customer because she finds out you’ve been billing her for months, yet when you bring up the fact that email receipts are sent out, she says she never received any of your emails. Yikes…

The good thing is, it’s really easy to make sure emails get delivered properly and fix any email problems you may currently be experiencing on your WordPress site.

But first, let’s talk about how email in WordPress works and why most people have problems with emails not being delivered.

How Does WordPress Email Work?

When your visitors use a form on your site to submit information to you, WordPress uses the wp_mail () function to send the information via email.

At that point, the email gets sent out from your server (that hosts your website) and gets delivered to the recipient’s inbox via their server.

The Problem

WordPress uses the PHP mail function to send out emails through your server. However, many hosting provider do not make this function available to you, which means that depending on your host, your emails not get sent at all.

This isn’t a problem with your WordPress installation nor your website itself. It just means that your host’s server does not allow for outgoing mail.

But even if your host does have the function configured properly and allows for emails to be sent out from your server, you have another problem that will affect your email deliverability.

As with most users, you’re probably hosting your site on a shared server. This means that every website on your shared server sends out email from the same server. Same server means the same IP address.

And the problem with so many users sending email from the same IP address is that if one user abuses their email capabilities by sending spam, their emails, along with the IP address will be flagged for spam. At that point, your emails will also start going into the recipients’ junk folders, even if you had nothing to do with the spam that was being sent by another user.

That’s why even if your emails get sent out, they’re probably landing in the junk folder.

In summary, if you rely on your hosting provider’s server to send out email via WordPress, you get stuck with one of two problems:

  1. Server won’t allow emails to be sent.
  2. Server’s reputation is bad.

So how do you fix this and ensure that your emails get sent out and delivered properly?

The Solution

User a different server to send your email.

How?

Enter SendGrid.

When you send your emails through SendGrid, it gets sent from their servers and not yours.

The benefit of this is that SendGrid is a company that’s focused on email deliverability.

They make sure that their servers maintain a great reputation so their users’ emails will be delivered as it should.

How to Set Up SendGrid for WordPress

But the best part about using SendGrid for WordPress emails is that it’s free and easy to install.

Here are step-by-step instructions on how you can set up SendGrid for your WordPress website.

1. First, you’ll have to set up a SendGrid account by visiting this URL: http://sendgrid.com/

2. Once you set up your account and verify your email, it will ask you to wait until your account is provisioned and ready to use.

This usually takes a couple of minutes and you’ll know your account is ready to be used if you log in and no longer see that notification or if you receive an email letting you know that your account is ready to go.

3. When your account is ready, install the SendGrid plugin on your WordPress site.

4. Now you have to connect your SendGrid account to the plugin on your site. To do this, navigate to your Settings > SendGrid.

sendgrid-settings

5. The first section of the SendGrid settings page is titled “SendGrid Credentials.”

SendGrid account information

Make sure you fill out all four fields in the section. This is what you should have:

Authentication method: Username&Password
Username: Your SendGrid username
Password: Your SendGrid passwordSend Mail with: API

6. Once you fill that out, scroll to the bottom of the page and you’ll see an option to Update Settings like so:

save SendGrid settings

Click the “Update Settings” button to save everything.

And that’s it! You’re ready to start sending emails through SendGrid.

At this point, if you want to test it to make sure your emails are being sent through SendGrid’s servers, fill out a form on your website that will trigger a notification email to you.

Then log in to your SendGrid account and click Activity on the left-hand menu.

SendGrid email activity

On that page, you’ll see and activity log of every email that was sent through SendGrid.

And speaking of the Activity page, you can always see the status of every email that is sent through your WordPress site and monitor deliveries and opens.

End-to-End Testing

Once you have SendGrid or any other SMTP mailer set up, you should do an end-to-end test to make sure all the plumbing is working correctly.

The first thing you have to do is make sure your form is working properly. So go to a contact form on your website to fill it out and submit it. You should get a successful post notification according to the way your form is set up and the email notification should be sent to an inbox that you can access.

The next step is to make sure your WordPress’ email function is working correctly. This is very difficult thing to do unless you have a lot of technical knowledge and have confidence navigating through your database.

Otherwise, you can use add-ons for popular form plugins that will help you understand everything that is happening behind the scenes. One such example is the Logging Add-on for Gravity Forms. This add-on allows you to see a log of all the emails that go out through a form submission on your site. In that log is technical information that will help you understand if WordPress successfully pushed the contents to your mailer to be sent out as an email.

Now, assuming you use SendGrid, you can log in to your SendGrid account and view the Activity page to see what happened to that email.

In your SendGrid’s Activity page, you should see two activity logs for that email if it was sent successfully:

  1. Email Processed
  2. Email Delivered

And if the recipient opens the email, you’ll also see a third activity log: Email Opened.

At this point, your email is delivered. Check your inbox to confirm that it’s there and that it didn’t go to spam.

Monitoring Email Deliveries and Performance

Once you have SendGrid implemented, you’ll be able to diagnose email issues as they get reported. But is there a way to spot problems before your users or customers start reporting them?

Yes there is, thanks to a nice dashboard reporting feature by SendGrid’s WordPress plugin.

When you install the plugin, you have the option of displaying a summary of SendGrid’s statistics on your WordPress dashboard.

SendGrid WordPress Statistics

You can see that this morning, when I logged in to the WordPress admin at around 6:00 a.m., it told me that there were 39 emails sent out today so far through our website (either transactional emails or contact form submissions). Of those 39 emails, 100% of them got delivered.

Anytime one of our admins log in to the WordPress admin throughout the day, they’ll always take a quick glance at this box and be able to see if any emails failed to deliver. If the delivery rate is below 100%, that admin submits a ticket so we can diagnose the problem. This way, we won’t have to constantly log in to our SendGrid account and monitor emails through a different browser tab.

Sign Up for New Content