简体   繁体   中英

Laravel Swiftmailer, email is not working on Azure

My site emailing was working fine on ubuntu. It stopped working after moving to Azure cloud server. I am using gmail smtp and getting the following error:

Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 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 m143sm21528218qke.18 - gsmtp
"

Any sort of help is appreciated.

Based on the message above, the error might be due to the mismatching of password with account. You can check it first. If it doesn't help, I have no idea either.

If user and pass are correct then Step 2 might help https://support.google.com/mail/answer/7126229?p=BadCredentials

Step 2: Try these troubleshooting steps

Update your email client to the latest version.

Use an App Password: If you use 2-Step Verification, try signing in with an App Password.

Allow less secure apps: If you don't use 2-Step Verification, you might need to allow less secure apps to access your account.

If you recently changed your Gmail password, you might need to re-enter your Gmail account information or completely repeat your Gmail account setup on your other email client.

> If the tips above didn't help, visit https://www.google.com/accounts/DisplayUnlockCaptcha and follow the steps on the page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM