how to send wordpress emails with sparkpost

How to Send WordPress Emails With SparkPost [Step by Step]

Do you want to send WordPress emails with SparkPost?

SparkPost is a cloud-based email delivery provider that helps you improve the deliverability of emails sent from your website. It provides reliable email deliverability solutions and works great when paired 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:

But first!

Why Use WP Mail SMTP?

By default, WordPress uses the PHP mail function to send emails generated by your contact form plugins.

WPForms is the best WordPress Form Builder plugin. Get it for free!

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.

wp mail smtp

Using the WP Mail SMTP plugin, you can:

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.

sparkpost signup

This will take you to the pricing page of SparkPost, choose your plan, and click on the Get Started button.

create sparkpost account

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.

add sending domain

Clicking this will redirect you to the new page; click on Add Sending Domain again.

click sending domains

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.

choose 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.

add domain name

Once you add your website domain, click on the Save and Continue button.

save and continue domain name

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.

choose domain alignment

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.

dns records provided by sparkpost

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.

verify domain

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.

sparkpost verified domain

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.

sparkpost api keys

Next, click on the Create API Key button.

create sparkpost api key

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.

create sparkpost api key

Now, a new page will open with your SparkPost API key.

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.

activate wp mail smtp

Once WP Mail SMTP is installed, go to your WordPress dashboard and click WP Mail SMTP » Settings.

open 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.

wp mail smtp wizard

Select SparkPost as Your SMTP Mailer

In the next step, you need to select SparkPost as your SMTP mailer.

select sparkpost as wp mail 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:

configure sparkpost mailer

  • 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.

email features of 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.

wizard setup successful

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.

test wp mail smtp and sparkpost connection

In the Send field, add any email address you have access to and click on the Send Email button.

send test email

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

email sent successfully 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.

check test mail in 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.

If you like this article, then please follow us on Facebook and Twitter for more free WordPress tutorials.

Using WordPress and want to get WPForms for free?

Enter the URL to your WordPress website to install.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.