Gmail Email problem configuration

Hello, I have problem with mail configuration with ghost. I’m using docker image and configure the mail data with environment variables like this:

I used Gmail smtp for send mails in other systems with success, but without success on ghost :frowning:

This is my configuration:
- mail__transport=SMTP
- mail__options__host=smtp.gmail.com
- mail__options__port=587
- mail__options__auth__user=no-reply@gmailsubdomain.com
- mail__options__auth__password=password
- mail__from=no-reply@gmailsubdomain.com

Also I try with the secureConnection=true or false and with port 465 or 587. On all cases the error was:

Failed to send email. Reason: Invalid login - 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials e6sm1879051qkg.89 - gsmtp.

I use the above settings for gitlab on my own server and all works ok…
any help appreciated…

Same error for me (Failed to send email. Reason: Invalid login - 535 Authentication failed: Bad username / password.)
I’m using GHOST 2.37.0 On Azure App Service (Windows)
Config added to config.production.json
“mail”: {
“transport”: “SMTP”,
“from”: “‘my email’ av8or@email.com”,
“options”: {
“service”: “Gmail”,
“auth”: {
“user”: “av8or@gmail.com”,
“pass”: “P@ssowrd”
}
}
},
Set the gmail to “allow less secure”

perhaps the password is spelled wrong - owrd?

No, the password is ok. Also I tried to use the configuration with another software with smtp and It works ok, so the problem is with ghost or ghost in docker…