Skip to content

WordPress + SendGrid integration — what to set, what to skip

SendGrid on WordPress, configured the way a deliverability operator would do it — sender authentication, scoped API keys, event webhooks, and the reasons to pick something else.

SendGrid (Twilio SendGrid) is the most visible name in the WordPress SMTP-plugin dropdowns, which is why most operators end up on it without comparing. It is a fine product — generous free tier, big install base, mature dashboards. It is also where deliverability has degraded over the last two years on shared IPs as the platform took on more low-quality senders. For transactional-only WordPress traffic, it works; for marketing on a shared IP, expect inbox placement to be worse than Postmark or a dedicated-IP SES setup.

What’s happening

SendGrid integrates with WordPress via the v3 HTTP API. WP Mail SMTP, FluentSMTP, and Post SMTP all ship the SendGrid mailer. The API expects a Bearer token, the From address must be verified through “Sender Authentication,” and the domain needs DKIM and SPF published as CNAMEs (SendGrid’s default) or TXT (manual mode). The CNAME mode lets SendGrid rotate keys without you touching DNS, which is the right tradeoff for a managed fleet.

Three patterns produce silent failures specifically with SendGrid:

  • The API key is created without the mail.send scope. The plugin returns true; SendGrid returns 403 the operator never sees.
  • The From address is not on a domain that completed Sender Authentication. SendGrid rejects with “550 The from address does not match a verified Sender Identity.”
  • The free tier’s daily limit (100/day) is exceeded mid-day. Subsequent sends get 429s; the plugin logs them as “Sent” because of an old retry bug that was fixed years ago but lives on in cached configurations.

How to verify

dig +short CNAME s1._domainkey.example.com
dig +short CNAME s2._domainkey.example.com
curl -s -H "Authorization: Bearer $SENDGRID_API_KEY" \
  https://api.sendgrid.com/v3/scopes | jq '.scopes' | grep mail.send

The SendGrid dashboard’s “Sender Authentication” page must show the domain as Verified with both DKIM CNAMEs valid. Activity > Email Activity within SendGrid is the source of truth — anything that left WordPress and didn’t arrive shows up here within seconds.

The fix

  1. Authenticate the sending domain, not individual sender addresses. Domain authentication is a one-time DNS setup; sender-by-sender verification produces drift the moment HR adds a new mailbox.
  2. Create the API key with mail.send permission only — restricted scope, not full access. Store it in wp-config.php constants (WPMS_SMTP_PASS for WP Mail SMTP, etc.), not in the database.
  3. Enable Event Webhooks for bounce, dropped, spamreport, unsubscribe. Point them at a WordPress endpoint that updates user records — same pattern as Mailgun, same reason.
  4. Decide whether you actually want SendGrid for marketing volume. If the sending domain reputation matters, run transactional on a dedicated subdomain (txn.example.com) and marketing on another (news.example.com). Splitting the streams keeps a poor marketing campaign from poisoning the password-reset queue.
  5. Watch the daily volume against the plan tier — the failure mode where the free tier maxes out mid-day is invisible at the WordPress layer.
  6. If inbox placement to Gmail and Outlook is degrading despite clean DKIM/SPF/DMARC, that is the shared-IP reputation issue. The fix is a dedicated IP (higher tier) or moving transactional to Postmark. For an enterprise WordPress hosting account, the split-provider arrangement is the standard pattern.

Stack Harbor manages SendGrid across enterprise WordPress hosting clients with the scope-restricted key, the split-subdomain approach, and the event webhook feeding into the WordPress user table. If inbox placement is dropping and you can’t tell whether it’s the IP pool or the content, we can audit the reputation chain.