#self-hosted sentry not send emails
4 messages · Page 1 of 1 (latest)
Hi @odd spire. I'm happy to dig into this for you! I'll check my internal sources for answers to your question! :wave:
I'll help you set up email sending with Gmail SMTP for your self-hosted Sentry instance.
To configure Gmail SMTP for your self-hosted Sentry, you need to make the following changes:
- First, edit your
config.ymlfile with these settings:
mail.backend: 'smtp' # Use dummy if you want to disable email entirely
mail.host: 'smtp.gmail.com'
mail.port: 587
mail.username: 'yourusername@gmail.com'
mail.password: 'your-app-password'
mail.use-tls: true
mail.use-ssl: false
mail.from: 'yourusername@gmail.com'
Note: You must use an App Password for Gmail, not your regular Gmail password. You can generate an App Password in your Google Account settings.
-
After making these changes, you need to run
./install.shscript to rebuild and restart the containers Self-Hosted Email. -
If you're using a reverse proxy, you may also need to enable these settings in
sentry/sentry.conf.py:
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
USE_X_FORWARDED_HOST = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True
Common issues to check if emails still aren't sending:
- Make sure you're using
smtp.gmail.com(notsmtp.google.com) GitHub Issue #2868 - Use double quotes around your password if it contains special characters GitHub Issue #1901
- If you've set
SENTRY_MAIL_HOSTin your.envfile, be aware this might conflict with your direct config.yml settings
You can test your email configuration by going to the admin panel at /manage/status/mail/ and sending a test email.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@odd spire Our robots are still learning and improving, please let us know if this response was correct by reacting below.