Skip to content

Connecting WordPress to Gmail Email SMTP

Engine: Hosted WordPress
WordPress plugin: Easy WordPress SMTP
SMTP provider: Gmail

So, you installed the plugin, entered in your credentials, checked it 10 times, and still the SMTP test to your gmail account you’ve linked with WordPress wont send.

Pain in the arse, I know.

Even debugging you get a plethora of information, but it may be a bit confusing.

I do feel a bit abashed that it took me so long to figure it out. But, to be honest, it kind of is a run around by gmail.


For WordPress, it’s sometimes necessary to send emails. This could be using Contact Forms, or even comment and subscription emails.

I’m going to step you through the entire process of how to connect the plugin called Easy WordPress SMTP.

As well, I’m going to go through the steps I had to take to set Gmail back upside right to allow WordPress (the plugin Easy WP SMTP) to connect to their SMTP server.

note: as mentioned in the comments below, Jason has created a new plugin called Postman SMTP to resolve this exact issue, and it is another great solution to the problem.

Installing and Configuring Easy WordPress SMTP

I used to use a plugin called WP-mail-SMTP, but I was turned off of it because of it’s readily displayed password box on the plugin configuration page. This is bad if you have more than one admin for the site. So, I now use Easy WordPress SMTP, which is nearly identical, but without this fault.

To install this plugin, head to your WordPress dashboard, Plugins -> add new -> search for Easy WordPress SMTP.

Install. Activate.

easy wp smtp settings

Head over to your dashboard again, and go to the plugin page: settings -> Easy WP SMTP. Above, I’ve circled the settings that need to be filled in. They all need to be filled in, but those circled in red are specifically your Gmail account credentials.

From Gmail’s help page:

  • Outgoing Mail (SMTP) Server

    • Port: 465 (or 587)
    • Requires SSL: Yes
    • Requires authentication: Yes
    • Use same settings as incoming mail server
  • Full Name or Display Name: [your name]
  • Account Name or User Name: your full Gmail address ( Google Apps users, please enter
  • Email address: your full Gmail address ( Google Apps users, please enter
  • Password: your Gmail password

Then The Problem

Now, if you’re paying close attention, the first time you try and test the settings you have set above will get an email on the account activated with it as follows:

Google suspicious sign in prevented

Further, if you look closely, you’ll notice in the error message created by the Easy WP SMTP plugin debug script, it suggests you go to to find the solution, which I will copy/paste here below (I’ve changed the mail clients to WordPress to make it more understandable for this specific application).

My client isn’t accepting my username and password

We suggest making some adjustments in your WordPress settings so you aren’t always prompted to enter your username and password. Please check the following settings in your mail client:

  • Make sure that you’ve entered your full email address (e.g.
  • Re-enter your password to ensure that it’s correct. Keep in mind that passwords are case-sensitive.
  • Make sure WordPress isn’t set to check for new mail too often. If WordPress checks for new messages more than once every 10 minutes, your client might repeatedly request your username and password.

Now, please follow the steps below to resolve the problem:

  1. Open your web browser and sign in to Gmail at If you see a word verification request, type the letters in the distorted picture and finish signing in.
  2. Close your browser and try (accessing your messages in your email client again) sending another test message with WordPress Easy WP SMTP again.
  3. If you’re still having problems, visit and sign in with your Gmail username and password. If necessary, enter the letters in the distorted picture.
  4. Click Continue.
  5. Test WordPress Easy WP SMTP again.

You’re most likely here reading this page because you’ve done the first part of this solution.

Now, play close attention to the second part of the solution, with the 5 steps. My problem was resolved after I completed step 3.

I had to:

  1. log out of my gmail account.
  2. Then copy paste that URL ( ) into my browser, follow the instructions.
  3. Click continue to finish this process
  4. then log back into WordPress and test the Easy WP SMTP again.


I hope this helped!

9 thoughts on “Connecting WordPress to Gmail Email SMTP”

  1. Sure helped me! I switched to Easy WordPress SMTP on one site using your instructions, but on a second site was able to reconnect the “Configure SMTP” plugin with the latter part only (meaning I used the URL you provided to log in to Google and do the reset). Thank you!

  2. I’ve just written a SMTP plug-in that takes care of TWO problems mentioned in this post.
    1. Entering your password in the settings screen (I require an OAuth token instead of a password)
    and 2. Gmail shutting down attempts at ‘plain’ encryption.

    I would love some feedback – you can install straight into WordPress by searching for “Postman”, or you can hit the plugin’s webpage:

    1. Dear Jason, this solution has worked perfectly for another site I was fighting with. However, some of the authentications that are required to install this plugin make things a little bit tedious. Any chance on eliminating a few of the steps in the deployment of this plugin?

Leave a Reply

Your email address will not be published. Required fields are marked *

6 + seventeen =