Error when i send email from my hosted laravel project

56 views Asked by At

When I send an email from my local Laravel 5.8 project it's send fine but when I upload the project code in host and I try to send an email using the Laravel project it gives me this error.

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\r\n".
Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data\r\n\

This is the content of my .env mail configurations

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD='The App Password Generator From Gmail (16 digits)'
MAIL_ENCRYPTION=ssl
[email protected]
MAIL_FROM_NAME="${APP_NAME}"
1

There are 1 answers

0
ayazBAM On

Try using the same configurations in the config/mail.php file. I was facing the same problem but then used the same configurations in config/mail.php file and it start working.