WP Mail SMTP and SendGrid Configuration Tutorial

wp mail smtp and sendgrid

Must read:

Ferdian Alfianto

Ferdian Alfianto

Ferdian Alfianto is an Internet enthusiast, Mac Lover; likes using Wordpress, experimenting with Linux (especially Debian and Ubuntu), tinkering with pfSense routers, happy experimenting with LEMP (Linux, Nginx, MariaDB, PHP) and Redis. You can contact me here.

Often times, email notifications from our WordPress site are sent to the spam / junk box, or even not at all. For the test, please try clicking forgot password on your wordpress login, check whether it is successful in entering the inbox, or even spam / junk; or even no email at all. This is because it is possible that our php mailer is not configured properly. The easiest solution, is to use a free SMTP server service like Sendgrid and the WP Mail SMTP plugin. And here is a tutorial on configuring the WP Mail SMTP plugin using Sendgrid.

Why choose the WP Mail SMTP plugin? With its statistics of over 1 million active users, there's no doubt that WP Mail SMTP is the top choice of WordPress site owners for their email solutions. This plugin is actively developed by WP Forms, one of the names of the most popular plugins in the WordPress world, which has more than 2 million installed.

Why use the services of Sendgrid? The first reason is because it's FREE! (everybody loves free stuff: D). Each month we are given e-mails as much as 40,000 times. That is more than enough for our WordPress site. Second, Sendgrid is an old player in the email service niche, especially email marketing. Especially after being acquired by Twilio in early 2019 for $2 billion, it seems that Sendgrid is not a tinned email service. The registration process and easy configuration are also an added value in themselves.

Sendgrid configuration

Sebelumnya, kita akan melakukan verifkasi nama domain di Sendgrid, ini penting agar email yang kita kirim bisa masuk ke inbox, bukan ke kotak spam/junk.  Silahkan login ke Sendgrid atau daftar jika anda belum mempunyai akun. Setelah login, pada tab Settings, choose Sender Authentication. On this Sender Authentication page, click Authenticate Your Domain.

Authenticate Your Domain

Next appears the question page where you put the site domain (point 1). Please fill in according to your domain's DNS service, or if you don't know, just choose any. At point 2, Sendgrid asks if you want to branding your domain link? This means, the link for tracking email, which usually uses the Sendgrid domain, can be changed according to your domain. But this is only optional. Because we only use it for notifications, not email marketing; so it doesn't matter the link sticks to the Sendgrid domain. Click Next to continue.

Next enter the domain name of your WordPress site, and click Next.

Next will appear CNAME information which you must set in your domain DNS. Make sure all CNAME's have been created, then click Verify.


Make sure the CNAME has been verified as below


Thus the domain configuration process in Sendgrid is complete, we will continue to create an API Key by clicking the menu API Keys, then click Create API Key.

In section API Key Name, enter any API Key name. And on API Key Permissions, choose Restricted Access, and click the button Create & View. Copy the API Key shown, and copy it in notepad then save it in a safe place (eg Google Drive).

WP Mail SMTP configuration

Please install WP Mail SMTP first on your WordPress site, and activate it. Then click page Settings of this plugin. And enter the configuration like the following example:

WP Mail SMTP settings

On the column From Email, enter any email name, it doesn't have to be an active email; but REQUIRED use the domain name that you have verified on Sendgrid. Like the example above, I use "do-not-reply@blog.tataweb.net"Because I want those who receive email not to reply, because this is just an email notification.

Check the box on Force From Email, this is so that all emails sent from your WordPress site, use the email address above.

In column From Name, this is only optional, can be filled at will. Likewise the checkbox Force From Name, you can check it or not.

On Mailer, of course choose SendGrid.

In section API key, enter the API Key that we created earlier, and click Save Settings.


All configuration has been completed, now is the time to do an email test. In WP Mail SMTP, click the tab Email Test. Enter your active email, and click Send Email. Check your email now, if the test email is successful in entering the inbox, it means the configuration is correct.


Latest articles:

MongoDB logo

Easy to Install MongoDB on Ubuntu 20.04

This tutorial explains how to install and configure MongoDB Community Edition on Ubuntu 20.04. MongoDB is a free, open-source document database. Belongs to the so-called database family

Related article:

rocket nginx

Rocket-Nginx + WP-Rocket: What are the Benefits?

What is Rocket-Nginx? Rocket-Nginx is a configuration add-on to Nginx for the WordPress cache plugin, WP-Rocket. The developer claims that by injecting the Rocket-Nginx configuration, the

Web Security

13 Easy Tips to Secure Your WordPress Site

The popularity of WordPress is a success, but it comes with consequences. More than 34% sites are built using the WordPress platform, of course this leaves WordPress sites vulnerable