'handlers': {
'syslog': {
'level': 'DEBUG',
'class': 'logging.handlers.SysLogHandler',
'facility': 'local7',
'address': '/dev/log',
'formatter': 'verbose'
},
'mail_admins': {
'level': 'WARNING',
'class': 'django.utils.log.AdminEmailHandler',
'formatter': 'verbose',
},
},
https://github.com/speedy-net/speedy-
net/blob/staging/speedy/core/settings/base.py#L206-L219
But the email I receive (as an admin) from logging is sent to me from
<root@localhost>, although I configured a from address
(DEFAULT_FROM_EMAIL) and other emails I receive from Django is from the
from address (which is different for the staging server)
https://github.com/speedy-net/speedy-
net/blob/staging/speedy/core/settings/staging_utils.py#L8
How do I change the from address of email sent to admins from logging?
--
Ticket URL: <https://code.djangoproject.com/ticket/30692>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Janez Kranjc):
It's the `SERVER_EMAIL` setting.
Check out the docs:
https://docs.djangoproject.com/en/2.2/topics/email/#mail-admins
--
Ticket URL: <https://code.djangoproject.com/ticket/30692#comment:1>
* status: new => closed
* resolution: => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/30692#comment:2>
Comment (by אורי):
Thank you, I was not aware about this separate setting.
--
Ticket URL: <https://code.djangoproject.com/ticket/30692#comment:3>
Comment (by Carlton Gibson):
Please don't use the issue tracker as a secondary support channel. Please
see TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/30692#comment:4>
Comment (by אורי):
I thought it was a bug of Django 1.11. I didn't know it works as expected.
--
Ticket URL: <https://code.djangoproject.com/ticket/30692#comment:5>