Closed
Description
Symfony version(s) affected
5.4.*
Description
With recents change on GMail, the following configuration for MAILER_DSN:
MAILER_DSN=gmail://USERNAME:PASSWORD@default
is no more valid, as the connection using username and password are not able anymore.
Is there any existing workaround or another configuration to be able to use SMTP with Google-Mailer ?
How to reproduce
- Install symfony/google-mailer
- Setup your .env with
MAILER_DSN=gmail://USERNAME:PASSWORD@default
(replace your username and password with your own credentials - Implement use the MailerInterface to send an email
- Your Request shouldn't succeed with following error:
message: Failed to authenticate on SMTP server with username "xxxxxxx" 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. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials y18-20020a05622a121200b002f90a33c78csm17479301qtx.67 - gsmtp".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials y18-20020a05622a121200b002f90a33c78csm17479301qtx.67 - gsmtp".". Authenticator "XOAUTH2" returned "Expected response code "235" but got code "334", with message "334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==".".
Possible Solution
No response
Additional Context
No response