Gmail setup help

Hello, i cant send email invoice, this is my .env

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=Gmail_e-mail
MAIL_PASSWORD=my_secret_password
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS=Gmail_e-mail
MAIL_FROM_NAME=Gmail_e-mail

i dont see any error
any help will be apreciate.

Hi,

Do you see any errors in the system logs table?

could you specify where to look for that?
in nginx I have the error.log and I don’t see anything
in storage / logs / laravel.logs it does not show any error either

It’s a table in the database.

You can also use the UI and use the last tab on the client preview pane.

I found this in the activities table

Failed to authenticate on SMTP server with username “myemail@gmail.com” 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. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials 184sm10437376qki.97 - gsmtp
". Authenticator PLAIN returned Expected response code 235 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 184sm10437376qki.97 - gsmtp
". Authenticator XOAUTH2 returned 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 184sm10437376qki.97 - gsmtp
".

the user name and password on the .env file they are correct

@Gustavo Are you using 2 factor authentication on GMail? If so, you cannot use your normal password as this needs the 6 digit OTA code. You will need an app password (from your GMail security settings page).

I had this very problem with one of my users accounts :wink:

1 Like

I had not realized that, good point, I just reviewed them and the options 2-Step Verification and Use your phone to sign in are off

Pity…

Does your password have weird ascii characters in it? If so try changing it to alphanumeric only and see if that works. I’ve had to do this on a couple of accounts.

The info here may help:

I create a new gmail acount and now is working!

thanks to all for help me

1 Like