I am using django-sentry for logging errors. I also want to enable throttled error mails to be sent to admins whenever an error occurs. But I can not get it working.
a) Normal django error mailing is working. b) but on removing ADMINS and adding SENTRY_ADMINS(like below) it stops working:
DEBUG = False
TEMPLATE_DEBUG = DEBUG
SENTRY_TESTING = True
ADMINS = ()
SENTRY_ADMINS = ('[email protected]',)
MANAGERS = ADMINS
MIDDLEWARE_CLASSES = (
'sentry.client.middleware.SentryResponseErrorIdMiddleware',
....
)
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_PORT = 587
Though entries are correctly being made and shown in panel. I mark all errors as resolved before testing(to satisfy throttle condition of sentry) but it is still not working.
Can anyone point to what I am doing wrong here?
Jiaaro is almost correct. The From address used by Sentry (and Django itself) is defined by settings.SERVER_EMAIL. It will use the SENTRY_ADMINS addresses only to send email to.
So setting SERVER_EMAIL = EMAIL_HOST_USER
should fix this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With