SendGrid is an integration that can be setup to help process outgoing emails from your WordPress installation. This would essentially bypass your server which can be helpful if there are issues with sending emails on your site which are caused by your hosting server, or if you are on a Managed WordPress host (Such as WP Engine) who doesn’t include an email service (in which case you have to use 3rd party to send emails from your site).
Here is a video from SendGrid that explains how their service works:
SendGrid can integrate directly with WordPress through their API system.
They currently have a FREE tier that allows a generous number of email sends per month: https://sendgrid.com/marketing/sendgrid-services
After you setup your account you will need to complete the steps below. It should be noted that after this is setup, ALL emails sent through WordPress will use SendGrid and is not limited to just OptimizeMember emails. Any and All emails generated by WordPress will use the SendGrid integration.
SendGrid will need a little time to provision your account. Once that is setup you can continue with the integration. Save the link to this guide in your favorites or bookmarks and come back once the account is provisioned and you are able to login to your new SendGrid account.
Step 1: Create a SendGrid API Key
For this step, you’ll need to login to your SendGrid account, and then click the “settings” tab near the bottom left of the screen:
Then click on “API Keys”
Then go to “Create API Key > Generate API Key”.
Then name your API Key and make sure to give full access.
You will then need to save the API key.
Once you save the API key, you’ll need to save it in a safe place as you’ll never be able to see this API key again within your SendGrid Account:
Step 2: Install SendGrid Plugin
You’ll need to install the SendGrid plugin by going to your WordPress Dashboard, and then click through to “Plugins > Add New”.
Then Search for “SendGrid” plugin and install it:
Then, activate the plugin:
Step 3: SendGrid Plugin Settings
Once you activate the plugin in step 2 above, go to “settings > SendGrid” and then fill out the details.
You’ll need to use the API key from Step 1, and just make sure you have the Name, Sending email address, and reply email address.
The sending email is the email address that should show up to the person who receives the email, and the reply email address is the email you will receive any replies to from the email that was sent out.
Step 4: Send a test email to yourself
Now that you have integrated SendGrid with your WordPress site, you should send yourself a test email:
In your WordPress dashboard, go back to “Settings > SendGrid” and since you have integrated already with the API key, you’ll now see an email form at the bottom (below other settings) where you can send a test email. Fill out the form and click “send” – note that you don’t have to put anything in the “headers” section of that form.
Once you receive the email in your inbox, you can go back to your sendgrid account, and after you login, click on the “Activity” link on the left side. You’ll be able to see the status of emails that were sent from your site and whether they bounced, delivered, and if they were opened.
Step 5: (Optional) White labeling your domain name
If you noticed when you sent yourself a test email, the sending was “email@example.com via sendgrid.net”
In order to keep some emails being delivered to spam folders, we suggest using the White labeling feature in SendGrid which will get rid of the “via sendgrid.net” in the email.
You’ll need to go back to your SendGrid account, and then click on “Settings > Whitelabels > Domains” to set this up.
On the next screen, click the blue “Add Whitelabel” button:
Then you’ll be able to choose a sub domain and domain to use for the white label.
The Subdomain shouldn’t be anything that is already in use. If you don’t see your domain name in the dropdown, then you can click the link below it for “Use new domain” and you can type in your domain name there. Leave all other settings as is and click the “Save” button:
Now you’ll need to go through a validation process where SendGrid will create 3 CNAME records that you’ll need to setup with your domain name.
Click the blue “Confirm” button to begin this process:
You’ll need to copy the 3 CNAME records on the next screen and then create these through your web hosting account.
We’ll show you below how to add these CNAME records in cPanel. If your web host does not use cPanel, you may need to contact them to ask how these can be setup. Most web hosts can either do this for you, or provide instructions on where to make these changes.
For cPanel users, login to cPanel and then go to the “Simple DNS Zone Editor” – if you do not see this, you will need to ask your host to add these for you.
On the next screen, copy the data you got from SendGrid for the CNAME records, and add them like this (making sure to use the CNAME section, and not the A name section):
Once you save all 3 of the CNAME records, you’ll need to go back to your SendGrid account. Go to “Settings > Whitelabels > Domains”.
Then click the settings icon, and choose “Validate”.
If you get any errors it will likely be that your DNS needs time to update with these CNAME records. It could take up to 48 hours. Just come back and repeat the validation process again later and it should work fine. Then just send another test email and you should no longer see the “via sendgrid.net” text after your sending email.
At this stage you have completed the integration with SendGrid to your WordPress site and all emails should now be working with OptmizeMember. We highly suggest completing a couple of test transactions to ensure that email is being delivered properly and without the “via sendgrid” attached to the sending email.
If you have any issues with validating the CNAME records, or are using Godaddy with SendGrid, please see this guide: https://sendgrid.com/docs/Classroom/Troubleshooting/Authentication/i_have_created_dns_records_but_the_whitelabel_wizard_is_not_validating_them.html
If you have further questions or need help please don’t hesitate to get in touch with our friendly support team by clicking the button below.