Do you want to send WordPress emails with SparkPost?
SparkPost provides reliable email delivery with WP Mail SMTP.
So in this article, we’ll walk you through the step-by-step process of setting up SparkPost on your WordPress site using the WP Mail SMTP plugin.
Here’s a quick overview of the steps we’re going to work through:
In This Article
Why Use WP Mail SMTP?
By default, WordPress uses the PHP mail function to send emails generated by your contact form plugins.
Many WordPress hosting servers are not configured properly to use this PHP mail function, so chances are your WordPress emails, including the form notifications, won’t even make it into the spam folder.
The best approach to get your emails delivered right in the inbox is to configure SMTP (Simple Mail Transfer Protocol) settings on your WordPress websites.
We recommend using the WP Mail SMTP plugin. It allows you to easily configure your WordPress SMTP settings without writing a single line of code and provides powerful solutions that ensure your website sends emails reliably.
Using the WP Mail SMTP plugin, you can:
- Securely send WordPress emails through Gmail SMTP
- Send WordPress emails with Mailgun
- Use the Outlook account as your WordPress mailer
- Set up Brevo (formerly Sendinblue) as your WordPress mailer
So without further ado, let’s get started!
How to Send WordPress Emails With SparkPost
Follow these step-by-step instructions to get your SparkPost SMTP settings set up correctly.
Step 1: Create Your SparkPost Account
To get started, first, you need to create a SparkPost account.
To create your account, head over to SparkPost’s website, scroll down to the Email Sending section and click on the Get Started button.
This will take you to the pricing page of SparkPost, choose your plan, and click on the Get Started button.
If you’re testing out SparkPost in WordPress, you can start with its free developer account plan that allows you to send up to 500 emails per month without adding any credit card details.
Add Sending Domain
Once you’re done creating your SparkPost account, you’ll need to configure certain settings to integrate SparkPost with your WordPress website.
First, you need to add the sending domain to your SparkPost account.
To do that, in your SparkPost account dashboard, click on the Add Sending Domain button.
Clicking this will redirect you to the new page; click on Add Sending Domain again.
Next, you’ll need to select the type of domain you want to add. You’ve got three 3 domain options to choose from.
Go ahead and select the Sending Domain option.
Scroll down the page till you see the Domain and Assignment option.
Add Your Website Domain Name
Next, enter your website’s domain in the given Domain field.
Once you add your website domain, click on the Save and Continue button.
Awesome! You’ve successfully saved your sending domain in SparkPost.
Choose Your Domain Alignment
As soon as you save your sending domain, a popup window will open asking you to choose your domain alignment preferences.
Domain alignment is a technical setting that helps SparkPost to track emails that bounce.
Scroll down the popup content, and you’ll see an option named Verify domain for bounce for strict alignment.
Select Yes and click on the button Save and Continue.
Next, you’ll need to verify your sending domain.
Verify Your Sending Domain
After choosing your domain alignment, you’ll be redirected to a new page, where you need to verify your sending domain.
This process requires you to add DNS records to the DNS settings of your hosting account. This will help you authorize your website’s domain name as a reputable sender for email providers.
SparkPost will display the DNS records that you need to add to the settings section of your DNS provider.
Once you add your DNS records, click the checkbox next to The TXT and CNAME records have been added to the DNS provider, and then click on the Verify Domain button.
Note: The process of configuring DNS settings and adding new records might vary for different hosting providers. If you face any difficulty adding new DNS records, you can contact your hosting support.
After that, SparkPost runs its compliance checks for your sending domain. Once your domain passes the checks, you’ll see the Verified status in your SparkPost account’s domains list.
DNS changes take around 12-48 hours to update and complete the proper configuration. So if still hasn’t your domain listed as verified, there is no need to wait for this process to complete. You can jump on to the next step in the tutorial and check back later if your domain is verified or not.
Create Your SparkPost API Key
Now, this is the most important step because, in order to connect WP Mail SMTP to your SparkPost account, you’ll need an API key.
To get your API key, click on the API Keys tab present at the top of your SparkPost account dashboard.
Next, click on the Create API Key button.
Then enter an API Key Name. You can add any name as it’s only for your reference.
You’ll see the API Permissions option is by default set as All. We recommend not to alter this setting and leave it as it is.
And when you’re done, click on the Create API Key button at the bottom of the page.
Now, a new page will open with your SparkPost API key.
Keep this page open in your browser tab and get back to your WordPress website.
Step 2: Install the WP Mail SMTP Plugin
Now that you’ve created your SparkPost account successfully, it’s time to connect your SparkPost account to WP Mail SMTP on your WordPress site.
And to do that, first, you need to install and activate the WP Mail SMTP plugin.
Once WP Mail SMTP is installed, go to your WordPress dashboard and click WP Mail SMTP » Settings.
On the settings page, you’ll get 2 options to configure your mailer. Either you can open the Setup Wizard of WP Mail SMTP, or you can directly configure your mailer options on the settings page.
The wizard process is interactive and makes the configuration process pretty easy. All you need to do is follow the instructions, and you’re done!
Step 3: WP Mail SMTP Setup Wizard
As soon as you click on the activate button, you will be redirected to the Setup wizard of the WP Mail SMTP plugin. Click Let’s Get Started to begin the Setup Wizard.
Select SparkPost as Your SMTP Mailer
In the next step, you need to select SparkPost as your SMTP mailer.
Once done, click on the Save and Continue button.
Configure Mailer Settings (Add SparkPost API Key)
On the next screen, WP Mail SMTP asks you to configure the SparkPost mailer settings. These setting options are different for each mailer type.
For the SparkPost as a mailer option, you need to fill in the following details:
- API Key: Remembered the SparkPost browser tab we kept open? Go back to the tab, copy your SparkPost API key and paste it here.
- Region: Select the SparkPost server location (US or EU) that you’ve chosen while setting up your account.
- From Name: Enter the sender’s name. This name will be displayed to the recipients.
- From Email: Enter the name that will be used to send emails.
Once you complete these options, click Save and Continue.
Enable Email Features
On the next screen, you’ll find options to choose which email features you want to enable, including the powerful email logging in WP Mail SMTP.
Enable your email features and click Save and Continue.
Installation Setup Successful
Once you complete the configuration process, you’ll see the success message.
Great! You’ve successfully connected your SparkPost account to WP Mail SMTP.
Step 4: Send a Test Email
WP Mail SMTP automatically sends a test email to confirm that everything’s working. If you need to send more test emails, we’ll show you how to do that.
You can use WP Mail SMTP’s built-in email test tool to do so.
Go to WP Mail SMTP » Tools and click on the Email Test tab.
In the Send field, add any email address you have access to and click on the Send Email button.
Once the email has been sent, you’ll see a success message.
Now check the inbox of the email address you entered to see if you’ve received the test email.
If SparkPost is set up correctly, you’ll see the test email in your email inbox.
And that’s it! Now you know the detailed process of sending WordPress emails with SparkPost.
Next, Set Up WordPress Email Logs
We hope this post helps you set up SparkPost and WP Mail SMTP to fix your email deliverability in WordPress.
Looking for a simple way to set up email logging on your WordPress site? You might also want to check out our guide on how to set up WordPress email logs to keep records of every email that’s sent out from your website.
And if you’re looking for a form builder plugin to automate the form-building process of your site, you can get started with the most powerful WordPress form builder plugin today.