How to Setup Reliable WordPress Email Notifications with SendGrid with WP Mail SMTP

Have you noticed that you’re not receiving WordPress emails? Unfortunately, WordPress not sending emails is a common problem, but it’s easy to fix. In this tutorial, we’ll walk you through how to set up WordPress email notifications with SendGrid using WP Mail SMTP.

When Email Notifications Don’t Work

This can be a tricky problem, because you may not notice that WordPress isn’t sending form notifications until people start filling out your form, and their messages don’t reach your email inbox. You might notice form entries in your WordPress dashboard that haven’t been sent to your email, or discover there’s a problem when frustrated visitors reach out to you using social media or other methods.

Here’s what usually causes the problem…

By default, WordPress uses the PHP mail() function to send emails generated by WordPress or any contact plugin like WPForms.

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

The most common reason for missing these emails is when your WordPress hosting server isn’t configured to use the PHP mail() function.

Thankfully, you can work around this issue by using SMTP.

SMTP (Simple Mail Transfer Protocol) is the industry standard for sending emails. Unlike the PHP mail function, SMTP uses authentication which increases email deliverability. That’s why we recommend using SMTP to send emails in WordPress.

Make sure to take a look at these shocking digital marketing statistics for some facts that could help your business online.

Why Use WP Mail SMTP with SendGrid?

There are many different SMTP services available, but many of these aren’t secure.

While other methods require you to store sensitive login information in your WordPress dashboard, using SendGrid in WP Mail SMTP will keep your email passwords secure.

WordPress security is a big deal. You may want to read our post on the top WordPress security plugins.

SendGrid offers a free plan for sending up to 100 per day. For most small businesses and personal websites, that’s plenty. If you need to send more, you will likely need a paid service.

How to Find Your SendGrid API Key

Before we can configure your website to work with SendGrid, we need to set up an account and find your SendGrid API key. This key is a unique identifier and a secret token for authentication that will allow your website to interact with your account at SendGrid.

First, you’ll need to sign up for a SendGrid account by visiting their Pricing page. From here, you can choose the account type that fits your site’s needs.

For our example, we’ll be signing up for their free account (limited to 100 emails per day).

Try a free SendGrid account

Next, you’ll need to fill out a couple forms to create your account and set up a profile.

When creating your SendGrid account, be sure to use the same email address you’d like to set the From Email to in your form notification settings. These emails will need to match in later steps.

Create a new SendGrid account

After creating an account, click the Start button next to Integrate using our Web API or SMTP relay.

SendGrid setup - integrate using our Web API or SMTP relay

Next, you’ll be asked to choose a setup method. You can now click the Choose button under the SMTP Relay option.

Choose SMTP relay for SendGrid setup

On the next page, you’ll need to enter an API key name and then click Create Key.

Create a SendGrid API key

Once the API key has been generated, you’ll be ready to go to the next step. Be sure to leave this page open, as we’ll need this API key a little later.

Copy the SendGrid API key

Using SendGrid with WP Mail SMTP to Fix WordPress Emails

Now we can get started setting up SendGrid with WP Mail SMTP on your WordPress site.

First, install the WP Mail SMTP plugin. Here’s a step by step guide on how to install a WordPress plugin.

While in your WordPress dashboard, go to Settings » WP Mail SMTP.

At the top of this page, you can set the From Email and From Name. By default, these will fill with your site’s admin email and site name.

For the From Email, be sure this is set to the same email address used to set up your SendGrid account.

We also recommend enabling the Force From Email option. Since you will need the From Email in all plugins that send email to match this email address (a requirement in order for SMTP to work), this option will save you the trouble of editing the email settings throughout your site (in all form emails, etc).

Enable the Force From Email option in WP Mail SMTP

You may add any From Name you’d like, and you can also choose to Force From Name to apply this setting site-wide. Unlike From Email, having a specific From Name is not critical to the plugin’s functionality. However, it will help email recipients to easily see where these emails are coming from.

Set a From Name in WP Mail SMTP settings

Then in the Mailer field, select the SendGrid option.

Though optional, we also recommend checking the Return Path option to Set the return-path to match the From Email. That way, you’ll be notified if any messages bounce due to issues with the recipient’s email.

Select SendGrid as mailer in WP Mail SMTP settings and set Return Path

The last step on this page is to scroll to the SendGrid section and enter the API Key. Go ahead and flip back to the tab or window where your SendGrid account is open to copy the key you generated earlier.

After copying the key, return to the WP Mail SMTP settings and paste it into the API Key field.

Paste in SendGrid API key and save settings

Once these settings are saved, you’ll be ready to try sending a test email. To do this, click on the Email Test tab.

Send test email in WP Mail SMTP

On this tab, you can enter any email address that you have access to and click the Send Email button.

Once the email has processed, you should see a success message.

WP Mail SMTP test email was sent successfully

If you check the inbox for that email address, you should also soon receive the email for this test.

Test email for WPForms with SendGrid

Let’s finish by verifying the integration we just created. To do this, check the box labeled I’ve updated my settings and then click Next: Verify Integration.

Proceed to verify integration

When the next page loads, click the Verify Integration button. This will send an email to SendGrid for verification.

Verify integration in SendGrid

Once the email has arrived to SendGrid, they’ll let you know with a success message. This may take a few moments to complete.

Success message from SendGrid integration verification

If you’d like, you can stop here and submit a form to test email delivery. However, for long-term delivery success we recommend proceeding to the next steps to verify your domain and whitelabel email links.

Verifying Your Domain

The best way to ensure that your emails continue to deliver successfully over time is to verify your domain. In SendGrid, this is called “whitelabeling”, which means that your emails will appear to come from your own domain rather than SendGrid.

To get started on verification, you’ll need to open Settings » Whitelabels in SendGrid’s left menu or follow this link.

Then, click the + Add Domain button.

Add domain for whitelabel

This will open a new panel, where you’ll need to enter a subdomain to use for whitelabeling. For our example, we’ll use the subdomain “em”.

The subdomain can be anything you’d like, however SendGrid recommends:
Not using “mail” as many hosting companies will already use this and it could cause conflicts.
Not including any underscores (_) as this may not be compatible with some DNS providers

Add new domain whitelabel to SendGrid

You can leave the Automated Security option set to On, then click Save.

Enabled SendGrid automated security and save changes

Saving these settings will cause an overlay to appear. This will let you know that we still need to make DNS changes, which we’ll do in the next step.

SendGrid overlay to remind that DNS must be completed

After clicking Confirm, the next page will display a list of DNS records that you’ll need to add for your site.

For more details on modifying your site’s DNS, we recommend WPBeginner’s tutorial on DNS settings.

If you have additional questions about DNS or feel unsure about making changes, please contact your site’s hosting provider.

After adding these DNS records, click the Validate Records button. DNS changes can take up to 48 hours to be recognized, so you may need to check back on this later.

In the meantime, let’s continue to the other part of whitelabeling: Email Links.

Whitelabel Email Links

Whitelabeling email links will allow any links in the emails that are sent to use your own domain, rather than SendGrid’s. This will help to further ensure delivery by keeping all links tied to your own site.

To whitelabel email links, return to Settings » Whitelabels in SendGrid’s left menu. Then, click the + Add Email Link button.

Add email link for whitelabel

In the overlay that opens, you’ll need to enter another subdomain to be used in email links. This can be anything you like, though SendGrid’s documentation suggests “link” or “click” as good options.

For this example, we’ll use “link” as our prefix. Then you’ll need to select your domain and Save these settings.

Set up email link whitelabel in SendGrid

Just as we saw in the previous step, an additional overlay will appear reminding you that DNS changes will take up to 48 hours to take effect. Go ahead and click Confirm.

On the next screen, you’ll be provided with two additional DNS records to add to your site.

DNS records to add for email whitelabel

After adding these records to your site’s DNS, you can check back here click the Validate Records button. Remember that this may take a while, so you may need to check back again later.

Note: Be sure to submit a couple of test forms after completing this setup to check that emails deliver successfully.

If you see any issues, we recommend setting the From Email in your form’s notification settings to the same email you set up SendGrid with.

That’s it! When WordPress can’t send emails, you’re able to fix the problem. Now you’re ready to fix WordPress email notifications with SendGrid using WP Mail SMTP.

Looking for more email notification tips? You might also want to check out our guide on How to Send Users Confirmation Emails from WordPress Forms, which will show you how to send a thank you message to anyone who fills out your form.

Don’t have WPForms yet? What are you waiting for? Get started with the most powerful WordPress forms plugin today.

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

Using WordPress and want to get WPForms for free?

Enter the URL to your WordPress website to install.


  1. Thanks for reading this article – I hope you found it helpful.

    I wanted to let you know about our new WordPress survey plugin that allows you to build interactive polls and surveys within minutes. You also get best-in-class reporting, so you can make data-driven decisions.

    You can get it 100% free when you purchase WPForms Pro plan.

    Get Started with WPForms Today and see why over 2 million websites choose WPForms as their preferred online form builder.

    Syed Balkhi
    CEO of WPForms

  2. I am setting up a local server to build a web site and need to add SMTP services. I am using the WP Mail SMTP with SendGrid API key. All works very well with the exception of any email address with in it. The emails are held and never delivered by Yahoo.
    Is there something I need to do to register the SendGrid account to allow yahoo to process the deliveries?

  3. Im using this plugin with sendgrid, and email still go to spam for instance when sending to gmail… any idea why what might be?

    1. Hi Branden,

      If your test email for WP Mail SMTP is working, but email is still going to spam, the next step is to check the From Email in whichever plugin on your site is sending the email. In WPForms, for example, you can set the From Email by opening the form builder and going to Settings > Notifications.

      To ensure successful delivery, the email address will need to match in 3 places:

      1) The email address you used to set up the SendGrid account
      2) The From Email in WP Mail SMTP (in WordPress under Settings > WP Mail SMTP)
      3) The From Email in any plugin that sends email

      Hope this helps! If you’d like us to help debug and investigate the issue further, we offer email support for WP Mail SMTP to users with an active WPForms license. Additionally, as a valued WP Mail SMTP user, we offer 20% off your initial purchase 🙂


  4. I add sendgrid api key as adviced and validate my domain also by add dns but when try to send mail from my website using wp mail smtp with sendgrid api key mail not send , it showed below bug
    WordPress: 4.9.5
    WordPress MS: No
    PHP: 5.6.36
    WP Mail SMTP: 1.2.5

    Mailer: sendgrid
    Constants: No
    Api Key: Yes

    Following RFC 1341, section 7.2, if either text/html or text/plain are to be sent in your email: text/plain needs to be first, followed by text/html, followed by any other content. – content;

    1. Hi Dilip,

      We’re sorry to hear that SMTP isn’t working for you yet. When we see issues like this, the best next step is to run back through the tutorial to be certain that nothing might have been missed (redo each step, recopy details, etc).

      After this, if the problem persists, generally the next best thing to try is contacting your site’s hosting provider. Most SMTP issues are a result of server configuration issues, which your host should be able to help resolve.

      If you’d like us to help debug and investigate the issue further, we offer email support for WP Mail SMTP to users with an active WPForms license. Additionally, as a valued WP Mail SMTP user, we offer 20% off your initial purchase 🙂


  5. Just wanted to say that after much frustration trying to get these forms to function properly this tutorial saved my sanity. Appreciate your attention to detail – was very easy to follow and everything is working like a charm now, thanks!

    1. Hi Mandee,

      Definitely — email issues can be super frustrating. But I’m glad to hear this helped you get things up and running! 🙂

  6. Send grid settings have changed.
    Would be great to see an update on this procedure to match current send grid settings.

    1. Hi Craig,

      Absolutely – thanks for pointing this out! It looks like they’ve had a pretty significant redesign recently. We’ll be updating this tutorial as soon as possible.

      Thanks again!

  7. Hello,

    Thank you for your article.

    This is my scenario.
    I have a client; we’ll call her Sally.

    I have a Contact Form on her WordPress site.
    I want the CF email to go to her inbox;
    I also have the CF send an autoresponder to whoever filled out the CF form.

    1) If I set up her SendGrid account using and then that tries to send the email to her inbox;, will that cause an issue?

    Sally is on microsoft for her email and her DNS.


    2) Also, when you talk about “whitelisting” and “using a subdomain” do I literally have to set up a subdomain for Sally’s site?
    If yes, do I literally have to install WordPress on it?

    Thank you for your time.

    This is very useful information that you have shared.

    1. Hi Will,

      What you’re describing with the emails should work fine with SendGrid (though always wise to test in case there’s something unusual). In regards to your question about the subdomain, you don’t actually need to create one. As long as you follow along with all of the steps in the tutorial, there should be no issues when setting this up.

      I hope that helps! 🙂

  8. Will this plugin work if using Web API when setting up the API Key instead of using SMTP Relay? SendGrid recommends Web API for faster delivery. I have thousands of subscribers so fast delivery is important.

    1. Hi Robert,

      Unfortunately I’m not too familiar with the setup you have in mind. That being said, our plugin uses the SendGrid API. I’d recommend posting your question on the WP Mail SMTP forum and they can get you more information.

      Thanks! 🙂

  9. hi, i trie all the same setups but still going to spam folder my all emails are same but when i fill the contact form it goes to spam folder can you help me pleasw

      1. my All emails are going to spam even i Do the same steps as above its not related to wpforms only can you help me please

  10. Sendgrid authentication procedure has recently changed, you need to update this info please. Thanks for a great plug-in though!

    1. Hi D Roberts,

      Thanks for the heads up! I’ll go ahead and forward your comment to our team for review so they can look into the authentication procedure and update the article accordingly. 🙂

  11. Hi, I did all of this above ^ but my emails are being sent to users to their spam folders.. Any suggestions on how to fix this?

  12. What are your thoughts or experience with SendGrid’s lack up code maintenance and compatibility only up to WordPress v.4.9.10?

    SendGrid has not updated the plugin in over a year with the latest version 1.11.8 and not tested with WordPress ^5.

    Do you expect a newer version rollout soon?

    1. Hi Nik,

      I think it might actually be best that you get in touch with SendGrid since they would know their development schedule best and we don’t have any information on that so we can’t say if and when that is going to happen.

      That being said, if you’re looking for a mailer option, we’d definitely recommend checking out WP Mail SMTP for more information.

      Thanks! 🙂

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.