Send emails from WordPress using SendGrid with the free WP Mail SMTP plugin
How to configure WordPress email settings using SendGrid with the free WP Mail SMTP plugin. Including steps for updating your DNS SPF record and configuring DKIM for email authentication so your WordPress emails don't go into spam.
Before you begin
1 Register for a free SendGrid account
A free SendGrid account will allow you to send up to 100 emails a day, if you need to send more emails you'll need to upgrade to one of the paid SendGrid plans
2 Set up SendGrid Domain Authentication
Set up Domain Authentication in SendGrid using DKIM and SPF
https://techlabs.blog/categories/guides/set-up-domain-authentication-in-sendgrid-using-dkim-and-spf
3 Create a SendGrid API Key
Create an API key in SendGrid for sending SMTP email
https://techlabs.blog/categories/guides/create-an-api-key-in-sendgrid-for-sending-smtp-email
4 Update your DNS SPF Record
You'll need to update your DNS SPF record to include SendGrid
Each SendGrid account has a unique SPF record that uses the value that was created when setting up domain authentication
e.g. u261nnnn.wl0nn.sendgrid.net -all
Your DNS SPF record should include everything that sends emails as your domain. In this example the SPF record includes both SendGrid and Office 365
"v=spf1 include:spf.protection.outlook.com u261nnnn.wl0nn.sendgrid.net -all"
Install the WP Mail SMTP Plugin
WP Mail SMTP
https://wordpress.org/plugins/wp-mail-smtp
Plugins - Add New
Search for WP Mail
WP Mail SMTP - Install Now
Activate
Back to the Dashboard
Configure the WP Mail SMTP Plugin
From Email noreply@yourdomain.com
From Name Your Website Name
Select SendGrid
Enter your SendGrid API Key
Sending Domain yourdomain.com
Send a Test Email
Email Test
Enter your email address - click Send Email
Check email message headers
You can use Google's message header analyzer to check the message headers and see if the email has passed SPF and DKIM checks
Google Admin Toolbox Messageheader
https://toolbox.googleapps.com/apps/messageheader/analyzeheader
Comments