Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Send WordPress Email with SendGrid

Connect SendGrid to WordPress with the WP Mail SMTP plugin so your site emails reach the inbox.

WordPress3 min read26 steps26 screenshots

Why use SendGrid

By default WordPress sends mail with the PHP mail() function. It has no sign-in and many servers block it or mark it as spam. A service such as SendGrid sends the mail for you with good delivery. A shop that uses WooCommerce, for example, needs customers to get their order emails.

WordPress and SendGrid

Step 1: Create a SendGrid account

  1. Open the SendGrid website and click Start for free.
    The Start for free button
  2. Fill in your details and click Continue.
    The sign-up form
  3. Enter the code that SendGrid sends to your email to verify it.
    Verifying the email address

Step 2: Create a sender identity

You can use a single sender address or authenticate your whole domain. Domain authentication is the better choice for delivery.

Option 1: Single sender

  1. In SendGrid, click Create Identity.
    The Create Identity button
  2. Enter your details and click Create.
    The sender form
    The sender is created
  3. Open the confirmation email and click the link.
    Verifying the single sender

Option 2: Authenticate your domain (recommended)

Domain authentication proves that you own the domain. It protects your reputation.

  1. In SendGrid, go to Settings, then Sender Authentication, and click Authenticate Your Domain.
    Sender Authentication
    Authenticate your domain
  2. Choose your DNS provider. If it is not in the list, pick Other Host (Not Listed).
    Choosing the DNS provider
  3. Enter the domain you send from.
    Entering the From domain
  4. Open the additional settings and keep the defaults, unless you know you need a change.
    Additional settings
  5. SendGrid shows the DNS records to add.
    The DNS records to install

Add the DNS records

Add every record that SendGrid shows in the DNS zone of your domain. Do this in the control panel where your DNS is managed, for example in the DNS zone editor.

  1. Open the DNS editor and click Add new record.
    Adding a new record
  2. Enter the type, host and value exactly as SendGrid shows them.
    Entering the record
  3. Go back to SendGrid and click Verify.
    Verifying the records

DNS changes can take some time. Try again later if the check fails.

Step 3: Create an API key

  1. In SendGrid, go to Settings, then API Keys, and click Create API Key.
    API keys in SendGrid
  2. Give it a name and choose the access level. Restricted Access with only Mail Send is the safest. Click Create & View.
    Creating the API key
  3. Copy the key. SendGrid shows it only once.

Step 4: Set up WP Mail SMTP

  1. In WordPress, install and activate the WP Mail SMTP plugin.
  2. Go to WP Mail SMTP, then Settings.
    WP Mail SMTP settings
  3. Enter the From Email (it must match your verified sender or domain) and the From Name.
  4. Under Mailer, select SendGrid.
    Choosing SendGrid as the mailer
    The SendGrid options
  5. Paste the API key into the field API Key.
    Copying the API key
    Pasting the API key
  6. Click Save Settings.

Step 5: Send a test email

  1. In WP Mail SMTP, open the Email Test tab.
  2. Enter an address and click Send Email.
    Sending a test email
  3. The plugin shows a success message, and the mail arrives in the inbox.
    The test email was sent
Warning: Keep the API key private. Anyone who has it can send mail from your account.

Quick recap

  • Create a SendGrid account and verify your sender or domain.
  • Make an API key with the right to send mail.
  • Enter the key in WP Mail SMTP and send a test.