ARTICLE AD BOX
I have code to use the following in my environment file :
[email protected] GOOGLE_PASSWORD='xxxx xxxx xxxx xxxx'And PHP code as follows - using Swift_Mailer
// Create the Transport $transport = (new Swift_SmtpTransport('smtp.gmail.com', 465, 'ssl')) ->setUsername($_ENV['GOOGLE_EMAIL']) ->setPassword($_ENV['GOOGLE_PASSWORD']);But all of a sudden, today I get the following :
Failed to authenticate on SMTP server with username "[email protected]" using 3 possible authenticators. 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 xxx-xxx.17 - 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 xxx-xxx.17 - gsmtp ". Authenticator XOAUTH2 returned Expected response code 250 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 xxx-xxx.17 - gsmtp ".