Are you not receiving WordPress emails? Unfortunately, WordPress not sending emails is a common problem, but it’s easy to fix. In this tutorial, we’ll walk you through how to set up WordPress email notifications with SparkPost.
Why You’re Not Receiving Notifications
WordPress uses the PHP mail function to send emails that are generated by a contact form plugin like WPForms. Many WordPress hosting servers are not configured to use the PHP mail function, so chances are your WordPress emails, including the form notifications, won’t even make into the spam folder.
Thankfully, you can work around this issue by using SMTP.
SMTP (Simple Mail Transfer Protocol) is the industry standard for sending emails. Unlike PHP mail function, SMTP uses proper authentication which increases email deliverability. That’s why we recommend using SMTP to send emails in WordPress.
There are many different WordPress SMTP services that ensure email deliverability. Let’s take a look at how to set up SMTP service using SparkPost.
SparkPost vs. SendGrid
Before jumping in to the setup, let’s take a quick head to head comparison between SparkPost and SendGrid.
Both SparkPost and SendGrid are email delivery services that ensure that WordPress email notifications are delivered to your inbox. The best thing is that none of them require you to store sensitive login information in your WordPress dashboard.
Here’s the main difference.
SendGrid gives you a free plan for sending up to 3000 emails a month or up to 100 per day.
On the other hand, SparkPost has a free Developer Account plan for ongoing development and testing, which includes the ability to send up to 15,000 emails per month. Here are more details on SparkPost pricing and plans.
Note: SparkPost doesn’t allow you to use public domain emails such as Gmail and Yahoo. Instead, you can use emails from the domain you own. To use a free email address such as Gmail or Yahoo, see our tutorial on how to set up the WP Mail SMTP plugin.
Create an Account and Verify the Domain
First, go to SparkPost and create a free account.
Next, you’ll need to verify a domain, so you can send emails from that domain without any issue.
To verify a domain, navigate to Account » Sending Domains in your SparkPost account. Then, specify your domain and click Add Domain.
You’ll be asked to add DomainKeys Identified Mail (DKIM) to your DNS records in order to verify the domain you just added. To view the DKIM entries to be added, click Settings.
You’ll need to set up three elements in your DNS zone provider. They are the hostname, the record type, and the value. The record type for DKIM will be TXT.
Every DNS provider handles the input of DNS records in their own way. You can refer to this guide to learn more about setting up DKIM with different domain providers.
After adding the DKIM entries, click Test, which you can see below DKIM Record in your SparkPost account. You should now see a verification success message.
Create API Keys in SparkPost
Now you’ll need to create API keys in your SparkPost account by going to Account » API Keys » New API Key.
Specify a friendly name for your API key (we named ours “WPForms”). Then, click on the checkbox near to Send via SMTP. Next, scroll down the page and click Add API Key.
Now you can see the API Keys to be configured with the SparkPost WordPress plugin on your site.
Configure the SparkPost Plugin
Install and activate the SparkPost plugin on your site. Then, navigate to Settings » SparkPost.
- Click the checkbox near to Send email using SparkPost to enable sending WPForms notification using SparkPost.
- Choose SMTP 587 as your method.
- Go back to your SparkPost account to copy the API key. Insert it into the API Key field.
- You may enable or disable tracking and leave the template field blank.
- You can specify the From name and email. Bear in mind that the email domain must match with the verified sending domains. In addition, in WPForms, the same email should be used in the Send From setting in your form notifications.
Now click Save Changes.
Test Sending Emails
After configuring SparkPost Settings, scroll down the page to test sending emails. Enter your email and click Send Test Email.
If you’re all set, you’ll see the test email in the recipient email inbox.
Looking for more email notification tips? You might also want to check out our guide on How to Send Users Confirmation Emails from WordPress Forms, which will show you how to send a thank you message to anyone who fills out your form.
What are you waiting for? Get started with the most powerful WordPress forms plugin today.