I am using SwiftMailer (https://swiftmailer.symfony.com/docs/introduction.html)
$transport = Swift_SmtpTransport::newInstance($host, $port, $security) ->setUsername(isset($pUsername) ? $pUsername : $pEmailGmail) ->setPassword($pPasswordGmail); $mMailer = Swift_Mailer::newInstance($transport); $mEmail = Swift_Message::newInstance();
But all of a sudden Im getting the error message :
<b>Fatal error</b>: Uncaught Swift_TransportException: 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 af70cd14be357-7c5f66650desm180162285a.79 - gsmtp
I know for sure that the password is correct.
Solved! Go to Solution.
I believe your issue is related to the fact that as of March 14, less secure apps using username and password no longer work. See https://support.google.com/a/answer/14114704?hl=en.
You should use a plugin/code/php library/etc. that supports OAUTH2 or look at app passwords: https://support.google.com/accounts/answer/185833?hl=en
HTH, KAM
Well, one note is that " App passwords can only be used with accounts that have 2-Step Verification turned on." Do you have it turned on? -KAM
I believe your issue is related to the fact that as of March 14, less secure apps using username and password no longer work. See https://support.google.com/a/answer/14114704?hl=en.
You should use a plugin/code/php library/etc. that supports OAUTH2 or look at app passwords: https://support.google.com/accounts/answer/185833?hl=en
HTH, KAM
Why is that I am unable to create an App Password ?
Well, one note is that " App passwords can only be used with accounts that have 2-Step Verification turned on." Do you have it turned on? -KAM
Got it - done and solved. Thanks.
@anjanesh was it the issue that you had to enable 2SV? -KAM
Yes KAM.