keepcalculator

06 Numbers and Powers

Send WordPress Email with SendGrid: Step-by-Step

Card No. 06·68008 · Updated · Standard formula, shown below

This guide shows you how to replace WordPress’s default PHP mail function with SendGrid’s reliable email delivery service. You’ll set up a SendGrid account, install the official plugin, and configure it so your site’s transactional emails (password resets, notifications, contact forms) actually land in inboxes instead of spam folders. You’ll need admin access to your WordPress dashboard and the ability to create an API key in SendGrid.

What You’ll Need

  • A WordPress site with admin access (wp-admin)
  • A SendGrid account (free tier available for low-volume senders)
  • Ability to add DNS records for your domain (for domain authentication)
  • An email address where you can receive verification emails

Step-by-Step

  1. Create a SendGrid account. Go to sendgrid.com and sign up. Use a real email address that you can access. Complete the email verification step.
  2. Set up your sender identity. In the SendGrid dashboard, navigate to Settings → Sender Authentication. Choose Domain Authentication and enter the domain you use for sending (e.g., yoursite.com). Follow the instructions to add the provided CNAME records to your domain’s DNS settings. This step is crucial for deliverability. If you can’t authenticate a domain, you can verify a single sender email address instead, but domain authentication is strongly recommended for production use.
  3. Create an API key. Go to Settings → API Keys → Create API Key. Give it a name like “WordPress” and choose Restricted Access. For permissions, select Mail Send (and optionally Stats for tracking). Click Create & View and copy the key immediately – it is shown only once.
  4. Install the SendGrid plugin. In your WordPress admin, go to Plugins → Add New. Search for “SendGrid”. The official plugin is called SendGrid by SendGrid. Click Install Now, then Activate.
  5. Configure the plugin. After activation, go to Settings → SendGrid. Enter your API key in the API Key field. Choose the SendGrid API method (not SMTP). Optionally, set a From Name and From Email – these should match the authenticated domain or sender. Save the settings.
  6. Send a test email. Use the Send a Test Email feature in the plugin settings. Enter your own email address and click send. Check your inbox and spam folder for the test message.
  7. Verify your setup. If the test email arrives, your WordPress site is now using SendGrid for all outgoing mail. You can also trigger a real email, like a password reset, to confirm.

Common Mistakes

  • Using an unauthenticated domain. Sending from a domain that isn’t verified in SendGrid often results in emails being rejected or marked as spam.
  • Storing the API key incorrectly. If you copy the key with extra spaces or miss part of it, authentication fails. Make sure you paste the entire key.
  • Choosing SMTP instead of API. The plugin’s SMTP method requires additional configuration and can be slower. The API method is simpler and recommended.
  • Not checking spam folders. Even with SendGrid, your test email might land in spam if the domain authentication isn’t fully propagated (can take up to 48 hours).

Tips

  • Authenticate your domain before sending. Wait for DNS propagation (usually a few hours) before sending a large volume of emails.
  • Use a dedicated sending domain. If you send marketing emails, consider using a subdomain like mail.yoursite.com to protect your main domain’s reputation.
  • Monitor your email stats. The SendGrid dashboard shows delivery rates, bounce rates, and spam reports. Check it periodically to catch issues early.
  • Keep your API key secure. Do not share it or expose it in your repository. If you suspect it’s compromised, revoke and recreate it.
  • Test regularly. After WordPress updates or plugin changes, send a test email to ensure everything still works.

Troubleshooting

  • Test email never arrives. Check your spam folder first. Then verify that the API key is correct and has Mail Send permission. Also confirm that the From Email address is verified or uses an authenticated domain.
  • Emails are rejected with a 401 error. This means authentication failed. Re-check your API key – it might have been truncated or have extra spaces.
  • Emails are rejected with a 403 error. This often indicates that your domain is not authenticated. Go back to SendGrid and ensure your domain is verified.
  • Emails are sent but go to spam. Wait for DNS propagation, then check your domain authentication status. Also, avoid using free email addresses (like Gmail) as the From address – use your authenticated domain.
  • WordPress still uses PHP mail. If you’re not sure the plugin is active, check the plugin settings – it should show a success message after saving. You can also install a mail logging plugin to verify the sending method.

Frequently Asked Questions

Do I need a paid SendGrid plan?

No, SendGrid offers a free tier that allows up to 100 emails per day, which is sufficient for most small to medium WordPress sites. If you exceed that, you’ll need to upgrade.

Will SendGrid slow down my WordPress site?

No, the API method is very fast. Emails are sent asynchronously, so there’s minimal impact on page load times.

Can I use SendGrid with a contact form plugin?

Yes, most contact form plugins (like Contact Form 7 or WPForms) use WordPress’s wp_mail() function, which SendGrid intercepts. So your forms will automatically send through SendGrid.

What if I already have an SMTP plugin installed?

You should deactivate and remove other SMTP plugins to avoid conflicts. SendGrid’s plugin handles the mail function directly, so multiple plugins can cause issues.

How do I know if my domain is authenticated?

In SendGrid, go to Settings → Sender Authentication. Your domain will show a status of “Verified” or “Pending”. Pending means DNS records haven’t propagated yet.

Can I send newsletters with SendGrid?

Yes, SendGrid supports marketing emails, but it’s a separate feature. This guide focuses on transactional emails from your WordPress site. For newsletters, you’d use SendGrid’s Marketing Campaigns feature.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →