#30692: Email sent by AdminEmailHandler is sent from <root@localhost>, not from
settings.DEFAULT_FROM_EMAIL
-----------------------------------------+------------------------
               Reporter:  אורי           |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  1.11
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 I'm using AdminEmailHandler in Speedy Net to send mail to the admins. My
 log file contains the following lines:

     '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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.5a2f9a4b87fedd297206b3ff115141af%40djangoproject.com.

Reply via email to