WordPress Installing WordPress Locally Installing WordPress Locally Enable Email for WordPress on Your Computer

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

I filled all the fields for SMTP configuration settings, but I get the following error when sending a test email.

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Todd Anderson
Todd Anderson
4,259 Points

In my case I am using gmail. After logging in I received an e-mail saying the attempt to sign in was blocked because it is a "less-secure" app trying to sign in. Not really sure I wan't to risk my account for a tutorial.

I have a similar problem. The error message I get is:

SMTP ERROR: Failed to connect to server: (0)SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Christian Edmonds
Christian Edmonds
Front End Web Development Techdegree Graduate 21,115 Points

Abdullah Alsowaygh Is this the only message you're receiving when trying to submit email? Is there a "SMTP ERROR" before the failed message?

chieko duncans
chieko duncans
2,264 Points

Same here. I also tried Easy WP SMTP , but, it does not work. SMTP Error: Could not connect to SMTP host.CLIENT -> SERVER: QUIT SMTP ERROR: QUIT command failed:

I tried the following https://www.wpsitecare.com/gmail-smtp-settings/ however it requires the SMTP host. I believe it is smtp.gmail.com But the instruction says that follow exactly same way. I think that means I need to find SMTP host not smtp.gmail.com?

I wanted to show screenshot, but this thread does not allow me to do. How everyone solved this issue with gmail?

I had changed the app security setting. it did not solve this issue neither.

9 Answers

kevin clark
kevin clark
31 Points

easy smtp will not work because every time i put in my email password, it changes it after I click save settings. Tried it many times, think there could be a bug?

Ethan Hernandez
Ethan Hernandez
2,407 Points

Same thing happens to me

Christian Edmonds
Christian Edmonds
Front End Web Development Techdegree Graduate 21,115 Points

I'm having the same issue with my user password being replaced when I save the settings. Unsure what's causing the issue.

In regards to the security issues with using gmail, looks like there security measures have changed and now make it a lot more difficult to add integration with apps like Easy SMTP. Check out: https://www.wpsitecare.com/gmail-smtp-settings/

Joseph Heydorn
Joseph Heydorn
iOS Development with Swift Techdegree Student 6,734 Points

I believe as it states down below it just replaces the password with a "Filler password" once saved so it makes it a lot harder to hack. Once saved it will lock in your password then just have a substitute put in place. As for the actual error Im still having issues with it myself.

Austin Johnson
Austin Johnson
11,447 Points

I recommend using SendGrid's plugin for an easy email server. Just create a free account and get an API key on Sendgrid.com. Here is the plugin -

https://wordpress.org/plugins/sendgrid-email-delivery-simplified/

I use it for all my clients.

Alena Holligan
STAFF
Alena Holligan
Treehouse Teacher

If you're trying to get any plugin to work with SMTP, check out this video that covers the settings you'll need for implementing SMTP with Google. There are also teacher's notes for other providers.

Alena Holligan
STAFF
Alena Holligan
Treehouse Teacher

I updated the Videos for "Build a Basic PHP Website" and they now include the updated version of PHP Mailer and show how to integrate with Gmail SMTP. Same basic steps should apply to other SMTP, see the teacher's notes. Start with "Using A Third-Party Library"

Pawel Slon
Pawel Slon
134 Points

Even after changing security measures on my gmail it won't go through...;/ Any alternative for Easy WP SMTP plugin? Would be nice to move forward with tutorial...

Christian Edmonds
Christian Edmonds
Front End Web Development Techdegree Graduate 21,115 Points

Pawel Slon I'm not sure of a fix for now. In order to replicate email in a local WP environment I'd look into other plugins like: https://wordpress.org/plugins/wp-mail-smtp/ . Looks to be somewhat similar.

Pawel Slon
Pawel Slon
134 Points

OK, so I tried Gmail SMTP plugin and it works. I can send max 300 emails daily, but that's a progress... Any comments on that plugin?

rory Stevens
rory Stevens
3,840 Points

I used WP Mail SMTP by WPForms (the one with the pigeon icon) and followed the install instructions, seemed to work