Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmail setup stopped working after the update #185

Closed
aspectvm opened this issue Jun 6, 2024 · 6 comments
Closed

Gmail setup stopped working after the update #185

aspectvm opened this issue Jun 6, 2024 · 6 comments

Comments

@aspectvm
Copy link

aspectvm commented Jun 6, 2024

I had a setup for the gmail smtp, like so:

debug: true
mailer:
  engine: smtp
  smtp:
    server: smtp.gmail.com
    port: 587
    user: '[email protected]'
    password: 'xxxx xxxx xxxx xxxx'

It was working fine for my both sites (I have a multisite setup) until the most recent update to 4.1.0. version. Now, it is logging this error:

"Failed to authenticate on SMTP server with username "[email protected]" using the following authenticators: "LOGIN", "PLAIN", "XOAUTH2". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535-5.7.8 Username and Password not accepted. For more information, go to 535 5.7.8 https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a6c805c59a2sm133747166b.50 - gsmtp".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535-5.7.8 Username and Password not accepted. For more information, go to 535 5.7.8 https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a6c805c59a2sm133747166b.50 - gsmtp".". Authenticator "XOAUTH2" returned "Expected response code "235" but got code "334", with message "334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==".". [] []"

I have tested the same credentials with phpMailer in a separate script, and it works no problem. This plugin (for me, at least) only works with Outlook currently, but not with Gmail.

@rhukster
Copy link
Member

rhukster commented Jun 6, 2024

What version did you update from?

@aspectvm
Copy link
Author

aspectvm commented Jun 7, 2024

The previous one 4.0.4. I also tried sending email with Gmail using CLI test command. Same situation.

@WeStartThen
Copy link

WeStartThen commented Nov 27, 2024

I get this same error trying to utilize gmail. Not sure if I've ever had it working as it's been a while but the setup seems simple enough, and save's fine, but get this.

edit: version 4.1.1

@rhukster
Copy link
Member

rhukster commented Jan 6, 2025

Did you see this note in the README:

As Gmail no longer supports the "allow less secure apps" option, you now need to have 2FA enabled on the account and setup an "App Password" to create a specific password rather than your general account password. Follow these instructions: https://support.google.com/accounts/answer/185833

Are you using an App password?

@rhukster
Copy link
Member

rhukster commented Jan 6, 2025

FYI, I just tested this with an app password and it worked fine. I had to set my 'from address' to the same google account I was using to login with, and also Google gave me an app password like this: pxzl vkxd xdap fomb, with spaces, and it kept the spaces when i copied and pasted it. However, I had to remove the spaces manualy so the pasword was pxzlvkxdxdapfomb. Yet another bad UI design descision on Google's part, the spaces are so you can read it better, but they are just visual cues.

@rhukster rhukster closed this as completed Jan 6, 2025
@WeStartThen
Copy link

Yes, I have been using an app password via 2 factor authentication settings.

Hey! The spaces were the key. I would have never expected to have to modify the password they gave me. I do see your note now in the docs (not sure if I initially missed it of if you added it). When I first tried removing the spaces I pasted into another field and cleared them out, but also managed to get an extra space at the end which obviously failed. Long story short, double triple check the app password is just the characters from google and no extra spaces!

Thanks for your time on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants