SendGrid
On this page
Connect CRM-NG SMTP to SendGrid with a Mail Send API key and an authenticated sending domain.
This guide shows you how to send your WordPress email through SendGrid, a large transactional email service run by Twilio. It suits sites of any size, from a contact form to a busy shop. SendGrid's entry-level options change from time to time; check its plans page for what is currently free or on trial.
The SendGrid mailer sends through SendGrid's API with an API key. The key needs only one permission, Mail Send. You also prove to SendGrid that you own the address or domain you send from.
Before you start
- A SendGrid account (sign up at
https://sendgrid.com/). New accounts may be reviewed before they can send. - A domain you control, with access to its DNS records. A single verified address works for testing, but a domain gives far better delivery.
- Administrator access to your WordPress site.
Setup
Step 1: Authenticate your domain
- Sign in to SendGrid
Go to
https://app.sendgrid.com/and sign in. - Open Sender Authentication
Open Settings → Sender Authentication.
- Start domain authentication
Choose Authenticate Your Domain, pick your DNS provider (or "Other"), and enter your domain. You can use a subdomain such as
mail.yourdomain.comif you prefer. - Publish the records
SendGrid shows several CNAME records. Add them at your DNS provider exactly as shown.
- Verify
Return to SendGrid and press Verify. When it succeeds, any address on that domain can send.
If you cannot change DNS yet, use Single Sender Verification on the same page to verify one address by email. Your From Email must then be exactly that address.
Step 2: Create an API key with Mail Send access
- Open API Keys
Open Settings → API Keys (the plugin's Create API Key link goes to
https://app.sendgrid.com/settings/api_keys) and choose Create API Key. - Name it
Use a name that identifies the site, such as "yourdomain.com WordPress".
- Restrict it
Choose Restricted Access. In the list of permissions, set Mail Send to full access and leave the rest off. The plugin only needs this access level.
- Copy the key
Press Create & View and copy the key, which starts with
SG.. SendGrid shows it once.
Step 3: Connect in CRM-NG SMTP
- Choose the mailer
In WordPress, open CRM-NG SMTP → Settings → General and set Mailer to SendGrid.
- Paste the key
Paste the key into API Key.
- Enter the sending domain
In Sending Domain, type the domain or subdomain you authenticated in SendGrid, for example
mail.yourdomain.com. CRM-NG SMTP uses it for the domain check after a test email; leave it empty if you only verified a single sender. - Set the sender
Set From Email to an address on the authenticated domain (or your single verified sender) and set From Name. Tick Force From Email so other plugins cannot send from an unverified address.
- Save
Press Save Settings.
Send a test email
Open CRM-NG SMTP → Tools → Email Test, enter your address in Send To, and press Send Email. In SendGrid, Activity shows the message and whether it was delivered. See Sending a test email.
The test page's domain check looks for sendgrid.net in your SPF record. With domain authentication set up, SendGrid handles SPF through its CNAME records, so focus on DKIM and DMARC passing. See Adding DNS records.
Troubleshooting
- The key is wrong, revoked, or lacks Mail Send: Authorization grant invalid or expired
- The From Email is not verified in SendGrid: From address does not match a verified Sender Identity
- The account is under review or limited: Authenticated user not authorized to send
- Access refused in general: 401 Unauthorized or Forbidden
- The recipient bounced before and is blocked: Email address in suppression list
- Your plan's limit is used up: Email sending limit reached
- Mail arrives in spam: Emails landing in spam
