Occasionally your WordPress site might experience trouble sending emails reliably. This can happen for a wide variety of reasons, and narrowing down the problem can be difficult. This article will walk you through some basic steps to understand why your site is having trouble and what you can do about it.
Understanding how Email works in WordPress
In order to properly troubleshoot your email situation, you need first to understand how email works in WordPress generally.
How does WordPress send emails?
By default, WordPress uses PHP to send all mail from your website. This is a somewhat different means of communication than standard emails. This means that your server (your host) has to support PHP mail in order for your WordPress emails to be sent.
But where does it send the emails from?
When you install WordPress for the first time, you are asked to provide a name and email address for the first user of the website. This is your primary administrator account and the email you choose here will be used to send all administrative emails from your website. It’s best to choose an email address from your domain name, rather than a Gmail or Hotmail address.
It’s possible though, that you didn’t create the first user in your WordPress site — your host did. Often, web hosts provide a “one-click” method for installing WordPress on your server. These often create default names and emails for this first user; like “WordPress <email@example.com>”.
We suggest setting an email address with your domain name in it as your WordPress Admin email rather than a Gmail or Hotmail address.
Testing your Email Configuration
Now that you understand how WordPress works with email in general, let’s dig into your specific environment a little and test whether WordPress can effectively send email out.
What is Your Administrative Email Address?
If you installed WordPress on your site yourself, then you chose your admin email at setup. Occasionally, hosts offer “one-click” WordPress installs and they use a generic email address, like firstname.lastname@example.org as the primary admin email account. This isn’t optimal for reliably sending emails.
To change this, simply go to “Settings > General” and update the field called “Email Address.”
Is WordPress Even Sending Emails Out?
Let’s find out now if your site is able to send email at all. The easiest way to do that is with a simple plugin called “Check Email”.
Simply install that, then go to to “Tools > Check Email”. You’ll see a screen like this:
The "Check Email" plugin allows you to easily confirm whether or not your WordPress website is able to send emails reliably.
It provides you with some handy information at the top about your environment, then a simple form to send a test email.
If you send that to an address you have access to and it sends successfully, then you know that your site is capable of effectively sending emails.
Here’s a few other very useful plugins for troubleshooting your email setup:
- WP Mail Log — this simply creates a text file of all the emails that go out from your site. It hasn’t been updated in a long time simply because it doesn’t need to be. It does what it says. Just use it for testing and delete that log when done.
- Email Cop — this plugin effectively prevents emails from actually going out, but captures them and displays them in a list for you to view them. This is a great tool for testing what actual emails look like when they go out from your site.
Using Email Cop to Test your Give Emails
If you are struggling with delivery of your emails from Give (or any plugin that sends emails out), Email Cop is a great tool to confirm whether WordPress is even sending the emails at all.
Email Cop captures all emails that go out from your site, but prevents them from actually sending, and lists them so you can view the actual email. This is great for testing purposes and confirming that your application (WordPress) is working as expected.
Let’s take a specific use-case. Let’s say you heard from a donor that they didn’t get their Donation Confirmation Email. Activate Email Cop, activate your Test Donation gateway, then make a test donation.
Next go to “Emails” and you should see two emails in the list. One should be the Admin Donation Notification email — addressed to you; and the other the Donation Confirmation Receipt email — addressed to the email you used to make the test donation.
If those two emails aren’t there, then Give is having a hard time sending emails out. Use the “Check Email” plugin above to see if your site can send emails in general.
The free "Email Cop" plugin allows you to capture emails and preview them in your browser when testing your WordPress email capabilities.
Reasons Why Emails Might Not Be Sending Correctly
Now that we know a bit about how WordPress sends emails, and we know how to test whether emails are being sent correctly, what do we do if emails are not being sent at all?
Double-check your Admin Email Address
Let’s say you used Email Cop above and you saw two emails generated. Well that just means that WordPress created those emails correctly and attempted to send them. If you then tried “Check Email” and you never get the test email, that means WordPress is sending the emails correctly, but your server is preventing them from being sent.
Some hosts require that all email sent from the server are from your root level domain address. For example, if your site is greatcause.org and your Admin email address is email@example.com, your server might refuse to send the emails that WordPress generates. This might explain the situation above.
Verify Your Email Address is Registered Correctly
Some hosts prevent email from sending if it is not properly registered in your account. For example, you might have an email address registered in your hosting account (or cPanel) called firstname.lastname@example.org but your WordPress site is sending from email@example.com which is not registered at all. Some hosts will prevent any mail from being sent out from your site unless it is registered properly.
So, with all that in mind, this is the best way to setup your email in your WordPress site:
- Your Admin email address uses your domain.
- That email address is registered in your hosting account.
- You’ve verified emails are sending out with either Email Cop or Check Email
If you’ve done all of that and you still have trouble, there’s one final thing you can do which has a virtual 99.9% success rate.
Sometimes configuring your website to send via SMTP is more reliable than using PHP mail.
Sending Email from your WordPress Site via SMTP
SMTP is the most reliable way to send email from a web server. It is not at all like PHP mail or wp_mail. It is secure and reliable.
But how do you configure your WordPress site to use SMTP instead of PHP mail?
We suggest using the Post SMTP plugin.
This is a great plugin because it provides a step-by-step walkthrough for configuring your email for SMTP.
This video covers exactly how it walks you through the process of setting up sending emails via SMTP using a Google SMTP API:
Our friends at WP Site Care have done a great job of going in-depth on SMTP and Email Deliverability in general. If you want to know even more about these subjects, here’s two great articles from them: