Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data "

Tags:

php

laravel

Hi i am trying to send emails in laravel.But when trying to send it is genrating following error and mails are not sending. But everything worked fine in localhost without any problems.

  Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data
     ". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data"

Following is my code in .env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=MyEmailPassword
MAIL_ENCRYPTION=ssl
[email protected]
MAIL_FROM_NAME='LifeLoveAndOtherThings'

I havent added additonal code in config/mail.php

'stream' => [
    'ssl' => [
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true,
    ],
],

I havent changed or added my emails in config/mail.php.I have set it up only in .env file. What is the issue here.

like image 561
Xavier Issac Avatar asked Apr 15 '20 06:04

Xavier Issac


People also ask

What is the error code for authenticator error 235?

Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [ SG2PR03CA0140.apcprd03.prod.outlook.com] ".

What does error code 535 mean?

Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data ".

What is SMTP error 535 authentication failed?

In short,“ SMTP Error (535): Authentication failed” error happens when there is a problem with SMTP configuration of email clients. Today, we saw how Bobcares solved “SMTP Error 535 Authentication failed”.

What is the error code for authentication unsuccessful?

Error message: "535: 5.7.3 Authentication unsuccessful" Would there be any additional configurations in O365 that I should look at? Was this reply helpful? Sorry this didn't help. Great! Thanks for your feedback.


Video Answer


2 Answers

I have a similar error and I enquoted my password and it worked like charm.

MAIL_PASSWORD="YourEmailPassword"

If the problem still continues try using username, password and port number in double quotes.

If you are using your personal Gmail account then follow these steps :

  1. Go to https://myaccount.google.com/security#connectedapps
  2. Take a look at Security menu -> Apps with account access menu.
  3. You must turn the option "Allow less secure apps" ON.

If you have already followed these steps, try re-starting your project. and if it still doesn't work, please continue these steps :

  1. Visit https://accounts.google.com/UnlockCaptcha
  2. Click continue button

Good luck!

like image 125
Muhammad Ahmad Avatar answered Nov 15 '22 20:11

Muhammad Ahmad


For me, this was my problem

Authenticator XOAUTH2 returned Expected response code 235 but got code "535", with message "535 5.7.3 Authentication unsuccessful 

This happened suddenly after a few month in production (before it worked perfectly). After having visited other post with similar question, none of which worked, the solution that I found was...

to change the password and WAIT SOME TIME in order to be effective.

I know, I know

I think that the password on outlook was expired after some time. The config was the same.

like image 27
Francesco Taioli Avatar answered Nov 15 '22 22:11

Francesco Taioli