mail.backend: ‘smtp’ # Use dummy if you want to disable email entirely
mail.host: ‘smtp.gmail.com’
mail.port: 587
mail.username: ‘sentry@mydomain.com’
mail.password: ‘********’
mail.use-tls: true
# The email address to send on behalf of
mail.from: ‘sentry@mydomain.com’
#If you’d like to configure email replies, enable this.
mail.enable-replies: true
# When email-replies are enabled, this value is used in the Reply-To header
mail.reply-hostname: ‘sentry.mydomain.com’
# If you’re using mailgun for inbound mail, set your API key and configure a
# route to forward to /api/hooks/mailgun/inbound/
# Also don’t forget to set mail.enable-replies: true above.
# mail.mailgun-api-key: ‘’
I have checked the username and password and they are both correct. I have enabled less secure apps in the gmail account.
Something I find strange in the Mail Settings is the Username in the dashboard:
Well, the “mydomain.com” is just a placeholder since the email account is from gsuite, the gmail account is the correct one and so is the password, as I have tested it.
then maybe you need to go through the trouble-shooting procedures one by one, which is provided by google already to you. For example, try to turn on “Less secure app access” for your google account.
SMTP is a quite mature protocal, so normally the problem is in the settings instead of the software.
I have already done this: “Less secure app access”. As I have described in the original post.
I know it is a mature protocol. The problem here lies with the inconsistencies between the configuration files, and the UI. And whether or not there are more Environment variables that may be overriding these options.
I keep all my email settings in the .env file only. You might go through your config.yml and sentry.conf.py to eliminate any possible email setting confiction/override .
Your username seems to be smtp.gmail.com (from your screenshot) which is 100% incorrect. I don’t know which request you are looking at but I’d recommend checking (or sharing) your config.yaml and sentry.conf.py files to make sure there are no overrides there. This also includes any environment variables that you may be consuming from there.
I thought that at first, however the response from the request that retrieves that information returns the correct username:
“mailUsername”:"sentry@mydomain.com"
The configuration, as I have shared above, seems to be correct, and sentry.conf.py does not have any line relating to email since I am using the default one, provided in version 10 on the onpremises github repository.
There is also no other Env. Var on the docker compose relating to SMTP configuration.
@luisg0nc - I’m out of ideas here. Have you tried these credentials with another mailing application? We sure know SMTP support works. I’m just trying to figure out what may be causing this. I’m also guessing you are using an “app password” for this, right? Also assuming you have tried this step from Google’s troubleshooting guide: