How to Set Up the SparkPost Mailer in WP Mail SMTP

Would you like to use SparkPost to improve email delivery rates for your WordPress site? This email sending platform is a popular choice among businesses looking to ensure their emails reach customers’ inboxes.

In this tutorial, we’ll show you how to set up the SparkPost mailer in WP Mail SMTP.

What Is SparkPost?

SparkPost is an email sending platform that works to improve the deliverability of emails sent from your website. It does this by authenticating your domain so that users’ email providers (e.g., Gmail, Yahoo, Outlook, etc.) recognize it as a reputable sender.

Many large brands use SparkPost to reliably deliver emails to customers. It’s a trusted solution for businesses, providing high delivery rates and enhanced security features.

SparkPost’s pricing is based on the number of emails you send per month. If you’d like to try the service out before you commit to a plan, you can sign up for a free Test account. It allows you to send up to 500 emails per month.

It’s important to note that in order to use SparkPost with WP Mail SMTP, you’ll need an email address at your website’s domain (i.e., [email protected]).

Configuring Your SparkPost Account

The first thing you’ll need to do is set up your SparkPost account. If you haven’t already, head over to SparkPost’s website and click the Get Started button to go to the Pricing page.

The Get Started button on the SparkPost homepage

Here, you can select a plan by adjusting the slider to the number of emails per month you plan to send. Then click on the Get Started button for the plan you want to purchase.

Choosing a SparkPost plan

For this tutorial, we’ll be using the free Test plan. However, the process is the same no matter which pricing option you choose.

Once you complete the checkout process, you’ll need to select which region you want your email server to be based in. SparkPost has servers in the US and the EU. If you’re located in Europe, we recommend choosing the SparkPost EU option.

If you are located outside of the EU, we recommend selecting SparkPost to use a server based in the US.

Choosing a region for your SparkPost email server

Then you’ll be asked to provide some basic information about yourself and your business, including:

  • Your first and last name
  • The name of your business
  • Your email address
  • A password

Creating a SparkPost account

After you provide all the required details and click Create Account, you’ll be redirected to your SparkPost dashboard. Here, you can authenticate the domain you’ll be sending emails from.

Adding Your Sending Domain

Next, you’ll need to add your sending domain to your SparkPost account. From your account dashboard, click the Add Sending Domain button.

Accessing the Domains screen in SparkPost

On the next screen, click on Add Sending Domain again.

Adding a new sending domain in SparkPost

Note: If you’ve set up another sending domain in your SparkPost account in the past, the Add Sending Domain button won’t be visible here. Click the Add a Domain button in the top right corner of the Domains screen instead to add and verify another domain.

Then you’ll need to select the type of domain you want to add. We recommend using the default Sending Domain option.

Choosing the primary use for your sending domain in SparkPost

Finally, enter your website’s domain in the field provided. This should be the web address you’re sending emails from, and you’ll need an email address at this domain to complete the rest of the steps in this tutorial.

Entering your sending domain to add it to your SparkPost account

Note: You can verify a subdomain in SparkPost and use an email address at that subdomain as the From Email in your WP Mail SMTP settings. This is usually the best setup for ensuring email delivery, as your subdomain’s reputation as an email sender is separate from your root domain’s.

Once you’ve entered your domain, click on Save and Continue to add your domain to your SparkPost account.

Saving your SparkPost sending domain

Domain Alignment

When you save your sending domain in SparkPost, you’ll see a popup window asking you to choose your domain alignment preferences.

We recommend using the Strict alignment option. This will set your sending domain and bounce domain to the same value, which is the simplest solution in most cases. To choose this option, select Yes under Verify this domain for bounce for strict alignment.

Selecting the option to use strict domain alignment for your sending domain in SparkPost

Once you’ve chosen your domain alignment preference, click on Save and Continue to proceed.

Saving your domain alignment preferences in SparkPost

Verifying Your Sending Domain

After you add your sending domain to your SparkPost account, you’ll need to verify it. This process involves adding DNS records to your DNS settings to tell email providers that your domain is a reputable sender.

Note: Not sure how to add the DNS records needed to verify your domain in SparkPost? For guidance on this process, please see our tutorial on adding DNS records to set up your mailer.

As soon as you finish adding your sending domain, SparkPost will show you the 2 DNS records you need to add.

The DNS records SparkPost requires for domain verification

Once you’ve done so, click the checkbox next to The TXT and CNAME records have been added to the DNS provider. Then click Verify Domain.

Verifying your domain in SparkPost

Next, SparkPost will carry out its compliance checks for your sending domain. This process can take up to 24 hours to complete and requires your DNS records to be updated. When your domain passes the checks, it will have a Verified status in your SparkPost account’s Domains list.

A verified domain listed in SparkPost

Note: It can take up to 48 hours for changes to your DNS settings to be recognized. If you’ve completed the steps above and your domain still isn’t listed as verified, wait and check back later. In the meantime, you can continue with the other steps in this tutorial.

Creating Your SparkPost API Key

In order to connect WP Mail SMTP to your SparkPost account, you’ll need an API key. To generate one, click on API Keys in the menu at the top of your SparkPost account dashboard.

Opening the API Keys page in your SparkPost dashboard

On the next screen, click the Create API Key button.

Creating a new API Key in SparkPost

Then enter a name for your API key. It’s for your reference only, so you can call it whatever you like.

We recommend leaving the API Permissions option set to All. When you’re ready, click on the Create API Key button at the bottom of the screen.

Naming your SparkPost API Key

This will bring you to a new screen with your SparkPost API key.

Viewing your SparkPost API key

Leave this page open in a separate browser tab or window as you move on to the next step, as you’ll need it when filling out your WP Mail SMTP settings.

Restricting API Permissions (Optional, Not Recommended)

Note: Although there are security benefits to restricting your SparkPost API permissions, we don’t recommend doing so.

These settings could unintentionally prevent you from being able to use other SparkPost features with future versions of WP Mail SMTP. If you choose to proceed, please monitor your WP Mail SMTP setup for complications.

SparkPost gives you the option of restricting your API key to one or more specific IP addresses. This prevents unauthorized parties from using your API key if they get ahold of it.

If you want to restrict API permissions for your API key, choose the Select option under API Permissions on the API key creation screen.

Enabling API IP address restrictions in SparkPost

Then check the box next to Transmissions: Read/Write and enter the IP addresses you’d like to grant API access to in the field provided.

Allowing API key transmissions read/write permissions for specified IP addresses in SparkPost

Click Create API Key to finish the process. Again, leave the screen with your API key open in a separate browser tab or window as you proceed to the next step.

Setting Up WP Mail SMTP

After you’ve set up your SparkPost account, verified your domain, and created an API key, you can set up WP Mail SMTP on your WordPress site.

First, open your WordPress admin area in a new browser tab or window. Be sure to install and activate the WP Mail SMTP plugin if you haven’t already.

Then head to WP Mail SMTP » Settings to configure the plugin. We’ve covered each setting in detail below.

From Email

First, you’ll need to enter the address from which you want to send all your site’s emails in the From Email field.

The From Name setting in WP Mail SMTP

This must be an email at the domain you verified in SparkPost. We also recommend checking the Force From Email box. This will make sure all emails sent from your site, including those generated by other plugins, use this same From Email.

From Name

The From Name will be listed as the sender on all your site’s emails. By default, it will be your website’s name. You can change it to anything you like.

The From Name setting in WP Mail SMTP

You can also enable the Force From Name option to keep this setting consistent across your site.


Under Mailer, select the SparkPost option.

Selecting the SparkPost mailer in the WP Mail SMTP settings

This will reveal a couple of additional settings for you to fill out.


Switch back over to the browser tab or window with your SparkPost API key and copy it by clicking on the button provided.

Copying a SparkPost API key

Then paste this value into the API Key field in your WP Mail SMTP settings.

Pasting a SparkPost API key in the WP Mail SMTP settings


Finally, under Region, select the SparkPost server location (US or EU) that you chose when you set up your account.

Selecting your SparkPost server's region in the WP Mail SMTP settings

When you’re done, click on the Save Settings button at the bottom of the screen.

Sending a Test Email

The last step in setting up the SparkPost mailer is to send a test email to be sure your connection is working properly. You can use WP Mail SMTP’s built-it email test tool to do so.

Note: Your domain must be verified in SparkPost in order for the test email to send properly. If your sending domain does not have a Verified status in your SparkPost Domains list, you’ll need to wait for your DNS records to be verified and your compliance checks to be completed before you proceed.

Head over to WP Mail SMTP » Tools and click on the Email Test tab.

Email test in WP Mail SMTP

In the Send To field, you can enter any email address you have access to. Unless you plan to only send plain text emails from your site, we recommend leaving the HTML setting toggled ON. When you’re ready, click the Send Email button.

Sending a test email

Once the email has been sent, you’ll see a success message.

WP Mail SMTP test email success messageCheck the inbox for the email address you entered. If everything is working properly, you should see your test email there.

A WP Mail SMTP test email That’s it! Now you know how to set up the SparkPost mailer in WP Mail SMTP.

Next, would you like to set up email logs so you can monitor all of the emails sent from your site? Check out our guide to the email logging feature in WP Mail SMTP for more details.