How to configure SparkPost to send emails in Email Subscribers?
SparkPost is an email infrastructure provider and one of the biggest global email delivery services, As the world’s biggest email sender, SparkPost enables businesses of all sizes to predict and optimize email performance. You can send 500 emails per month in their free plan.
In this guide, we will explain to you how to configure SparkPost to send emails in the Email Subscribers plugin.
Create a SparkPost Account
If you don’t already have an account with SparkPost, go ahead and sign up for an account on SparkPost’s website and verify your account.
Note: SparkPost is available in multiple regions. “SparkPost” refers to the SparkPost service hosted in North America. “SparkPost EU” refers to the SparkPost service hosted in Western Europe. An account created with SparkPost cannot be used with SparkPost EU, and vice-versa. You may use accounts in both regions.
Add a domain
To create a sending domain in SparkPost, you will need ownership or administrative access to your domain name, for example: example.com. You will also need access to make DNS configuration changes through your domain registrar (or DNS provider) for your sending domain.
To add your domain, login to your SparkPost account and go to
Configuration > Domains.
On the Domains list page, click on the
Add a Domain button.
Now select the
Sending Domain option on the next page as we will be using SparkPost only for email sending.
Subaccount Assignment section, choose an option according to your requirements i.e. if you want subdomain to be associated only with a sub account then choose
Assign to Subaccount option. You can learn more about SparkPost account and their types from here
Now click on the
Save and Continue button. You will get a confirmation message like below
No option as we are not using the subdomain for bounce handling in Email Subscribers plugin.
Note: SparkPost expects to see a legitimate web presence on each sending domain, so please ensure your website is accessible before adding a domain to your SparkPost account. If you use a subdomain, a legitimate web presence is only needed on the top-level domain.
Verify your domain
Before you can send mail using your domain, SparkPost needs to verify that you own it. Adding a DNS record to your domain is the recommended way to complete this verification. In the DNS Verification section you can find the TXT record Hostname and Value you need to add to your domain’s DNS records.
After you have added DNS records, check
The TXT record has been added to the DNS provider. option and click on the
Verify Domain button.
After successful verification, you should see in the DKIM Signing enabled for that domain.
Unfortunately, some DNS records take longer to update than others, even up to 24 hours. If you want, you can check to see if the DNS value has updated using a service like Whats My DNS. Just be sure to use the correct hostname there, too.
Note: If you don’t have access to update your DNS records for this domain, you can verify ownership further down in the page by sending an email to a mailbox you control on your domain. Then click on the link in the received email to verify. This will allow you to send email from this domain, but SparkPost will not be able to DKIM-sign the mail it sends on your behalf, which could cause deliverability issues. We recommend using DNS verification whenever possible for this reason.
Create a new API key
To create a new API key, go to
Configuration > API Keys and click on the
Create API Key button.
On the Create API key page,
- Add a name like Email Subscribers API Key in the
API Key Namefield to identify it later.
- Add a sub account in the
Subaccountfield if you want the API key to be associated with a sub account.
- In the API Permissions section, choose
Transmissions: Read/Write permissionsas we need only this permission to send emails.
- In the
Allowed IPsfield, you can leave it blank if you are not sure from which IP you are sending from. After all details have been added click on the
Create API Keybutton.
- After clicking on the
Create API Keybutton, you should see a success message and your new API key like below. Copy and save the new API key as you won’t be able to see it again later on.
Configuring Email Subscribers to Send Emails
Now that you’ve set up your DNS, you can prepare Email Subscribers to start using SparkPost for sending emails.
- Install and activate PRO version of Email Subscribers plugin
- Navigate to
Email Subscribers > Settingspage
- At the top of this page, you can set the From Name and From Email. By default, these will be filled with your site’s name and admin email.
For the From Email, use an email address associated with your verified domain from Step 3
- Now click on the
Email Sending taband scroll down to the option
Select a mailer to send mailand click on SparkPost as the mailer.
Now that you’ve selected SparkPost as your mailer, a new section will appear below the Mailers list. Here, you’ll need to enter API and Region information.
Enter the API Key created from Step 4.
Last, you’ll need to check the
Regionsetting. During sign up if you opted for SparkPost account, then you can select the United States option else you can select Europe option if you have opted for SparkPost EU option.
- Once this information is added, click on the
Save Settingsbutton at the bottom.
Send a Test Email
Once your domain is verified and your settings have been added to Email Subscribers, it’s important to send a test email to ensure that everything is working as expected. You can try sending a test email from the option provided just above Select a mailer section.
You can enter any email address that you have access to and click the
Send Email button. After sending the email, you should see a success message.
If you check the inbox for that email address, you should receive the email for this test.