Send Email Plugin in WordPress using the Gmail SMTP Server


First you need to install and activate the WP Mail SMTP plugin.

Upon activation, you need to visit Settings » Email page to configure the plugin settings.

Here is how to fill out the plugin settings:

From Email: Enter your Gmail address.
From Name: Enter your name or title of your website.
Mailer: Select ‘Send all WordPress emails via SMTP.
Return Path: Check the box to use the From email as return path.
SMTP Host: smtp.gmail.com
SMTP Port: 465
Encryption: Use SSL encryption
Authentication: Yes, use SMTP authentication
Username: Your complete Gmail address, e.g. john@yourdomain.com or john.smith@gmail.com
Password: Password of your Gmail account

Click on the save changes button to store your settings.

After saving your settings scroll down to the bottom of the page, and you will see ‘Send a test email’ section. Enter an email address to see if everything is working fine.

That’s all, you have successfully setup your WordPress site to send emails using Gmail SMTP servers.
Troubleshooting Gmail SMTP Not Working Issues

We have seen issues of Gmail SMTP not working with certain shared hosting configurations.

Take the following steps to fix the Gmail SMTP issue:

Login to your cPanel account and create an email account that matches your Google apps email address. This might seem strange because you’re not using your server, this step basically tricks your server into believing that you’re sending the email through the server.
In your cPanel account, go to MX Records and change the MX routing from automatic to Remote. It might be a little tricky to find since each host now has custom cPanel interface, but look for a small link next to MX that says Email Routing: Remote Mail Exchanger.
After that log back into your WordPress site and send a test email.