Note: At the time of publishing, SparkPost is FREE up to the first 100,000 emails. This should be enough for just about any WordPress e-mail requirements out there. They also have paid plans if you need more monthly emails.
I recently came across a cool service for sending emails from WordPress. I have had a few clients come to me over the years who needed help with sending mail from WordPress. I’m talking about all of the mail that WordPress sends, but for whatever reason – email just isn’t working. Everything from contact forms to password reset requests.
Usually, the problem is with the server. Sometimes it is an easy fix, and sometimes it isn’t. Sometimes you don’t even have access to it at all!
Before we get too far into it, you will need to verify your domain you are sending from. You’ll need access to one of two things:
- (Easy / Moderate difficulty) Have access – or be able to create an email address on your account called ‘firstname.lastname@example.org’ or ‘email@example.com’.
- (Advanced) Or – have access to the DNS settings and be able to add either a SPF (Text) entry or a DKIP entry.
Ok, now that we have that out of the way, let’s get started.
SparkPost is the world’s #1 email infrastructure provider with the highest performing email delivery service available. Their service sends over 3 trillion messages a year, more than 25 percent of the world’s non-spam email. You’ve probably received an email through their service today! Their Free plan was launched in March 2016, and is free for the first 100,000 emails – plenty for most WordPress users!
SparkPost isn’t’ just for WordPress e-mail. The service works for so much more! I am currently using it to send all emails from my VPS, as well as on a few different rails apps that need very limited email capabilites. The configuration is super-easy, and it just works. I don’t want to get too technical on this post, but if you want to use SparkPost on something besides WordPress – read more here and here.
Ok – head on over to https://www.sparkpost.com/sign-up and get yourself set up with an account. You can set up quite a few ‘sending’ domains for each account – so just set up an account and get started.
Next, you’ll need to add your domains that you want to send emails from. From your account Dashboard – go to ‘Account -> Sending Domains’ and click on the big ‘+ New Domain’ button.
Here is where you need to complete one of the three domain-verification steps. The easiest way is via email, but you can only send verification emails to the following addresses:
WordPress E-mail Plugin
Setting up SparkPost on WordPress is as easy as installing a plugin. Seriously… here is the link:
Once the plugin is installed, you’ll need to configure a couple of settings.
On the plugin settings page, make sure you:
- Tick ‘Send email using SparkPost’. If we don’t turn it on – it ain’t gonna work.
- Select the Method ‘HTTP API’
- Enter your API KEY (We’ll cover that in just a second)
- Enter the From name and the From email address. The ‘From email address’ MUST be from one of your verified ‘sending domains’, so make sure you don’t get too creative here and add something else.
The rest of the settings are up to you. I personally like analytics, so I turn on the tracking.
Once you have verified your domain, and installed and configured the WordPress plugin, you’ll need to set up an API Key. Don’t worry, this sounds way more complicated than it is. Just head back to your SparkPost Dashboard and navigate to ‘Account -> API Keys’ and click on the big ‘+ NEW API KEY’ button.
Enter a nifty name that you’ll be able to remember for this API (HINT: WordPress plugin) and select ‘Send via SMTP’ and ‘Transmissions: Read/Write’. If you know your server’s IP address, you can add it in here. This is totally optional, but will make your SparkPost account a little more secure if you use this. It should not have any effect on your WordPress site at all if you leave this blank.
Hit that big ‘ADD API KEY’ button when you are ready and on the next screen, you’ll see a big long string of characters. That is your own private, super secret API key. Copy the key across to your WordPress plugin, save the plugin settings, and you’re done!
Test your WordPress e-mail and everything should be working.
If you have any problems getting SparkPost to work with WordPress, or this has helped you – please leave a comment below!