I would like to be able to change the ‘from’ address of the admin error emails in production environments to be the email address of the user that generated the error. It would be convenient in triaging errors rather quickly.
I did examine the Django source code, but it doesn’t appear to be possible without writing my own custom function. Any ideas?
Thank you!
Hi Matthew,
There should be considered following:
1. Not always cod runs with user interaction - worker cases
2. Not always user authenticated
With such cases who the sender should be?
Regards,
Constantine C.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.
In such cases, we would have a fallback that is already established in the settings file.
From: django...@googlegroups.com [mailto:django...@googlegroups.com]
On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
Hi Matthew,
There should be considered following:
1. Not always cod runs with user interaction - worker cases
2. Not always user authenticated
With such cases who the sender should be?
Regards,
Constantine C.
On Nov 15, 2016 12:43 AM, "Matthew Pava" <Matthe...@iss.com> wrote:
I would like to be able to change the ‘from’ address of the admin error emails in production environments to be the email address of the user that generated the error. It would be convenient in triaging errors rather quickly.
I did examine the Django source code, but it doesn’t appear to be possible without writing my own custom function. Any ideas?
Thank you!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
In such cases, we would have a fallback that is already established in the settings file.
From: django...@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
Hi Matthew,
There should be considered following:
1. Not always cod runs with user interaction - worker cases
2. Not always user authenticatedWith such cases who the sender should be?
Regards,
Constantine C.
On Nov 15, 2016 12:43 AM, "Matthew Pava" <Matthe...@iss.com> wrote:
I would like to be able to change the ‘from’ address of the admin error emails in production environments to be the email address of the user that generated the error. It would be convenient in triaging errors rather quickly.
I did examine the Django source code, but it doesn’t appear to be possible without writing my own custom function. Any ideas?
Thank you!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL.
The error emails only go to the admins: me. I would not be confused because the subject line of the email indicates that it is coming from the Django app starting with [Django]. The value in receiving the emails with the user’s email address is so that if, for instance, the president of the company gets an error page or anyone else gets an error page, I can very quickly determine which error I should focus on by simply glancing on who the email is from. (In this case, the president…)
From: kosty...@gmail.com [mailto:kosty...@gmail.com]
On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 2:27 PM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
Sorry but I do not see any valuable reason of doing things in such way.
Email is sent from wrong sender.
And if someone decides to email back than those user would be confused.
It is better to call things by its name.
On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava <Matthe...@iss.com> wrote:
In such cases, we would have a fallback that is already established in the settings file.
From:
django...@googlegroups.com [mailto:django...@googlegroups.com]
On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
Hi Matthew,
There should be considered following:
1. Not always cod runs with user interaction - worker cases
2. Not always user authenticated
With such cases who the sender should be?
Regards,
Constantine C.
On Nov 15, 2016 12:43 AM, "Matthew Pava" <Matthe...@iss.com> wrote:
I would like to be able to change the ‘from’ address of the admin error emails in production environments to be the email address of the user that generated the error. It would be convenient in triaging errors rather quickly.
I did examine the Django source code, but it doesn’t appear to be possible without writing my own custom function. Any ideas?
Thank you!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK52boXM8Eg9aDpHOmZOqCHSne55e_DwMYWHRBF%3D086VsNDhbg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK52boXM8Eg9aDpHOmZOqCHSne55e_DwMYWHRBF%3D086VsNDhbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e995d53b0f8444fc9b29b95a1a5b45b7%40ISS1.ISS.LOCAL.
Thank you so much, Constantine! That was the clue I needed. It’s not exactly the cleanest solution, but it does get the job done. I copied AdminEmailHandler and mail_admins and modified them appropriately to include the from_email address.
I had some issue with “Apps not loaded,” but all I had to do then was move “from django.conf import settings” to the top of the file before all other imports.
From: kosty...@gmail.com [mailto:kosty...@gmail.com]
On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 3:19 PM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
As I know all error emails are sent within logger handler: 'mail_admins'.
I would suggest to override 'AdminEmailHandler' and 'mail_admins'.
for more information check logging documentation.
Hope that helps
On Tue, Nov 15, 2016 at 10:31 PM, Matthew Pava <Matthe...@iss.com> wrote:
The error emails only go to the admins: me. I would not be confused because the subject line of the email indicates that it is coming from the Django app starting with [Django]. The value in receiving the emails with the user’s email address is so that if, for instance, the president of the company gets an error page or anyone else gets an error page, I can very quickly determine which error I should focus on by simply glancing on who the email is from. (In this case, the president…)
From:
kosty...@gmail.com [mailto:kosty...@gmail.com]
On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 2:27 PM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
Sorry but I do not see any valuable reason of doing things in such way.
Email is sent from wrong sender.
And if someone decides to email back than those user would be confused.
It is better to call things by its name.
On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava <Matthe...@iss.com> wrote:
In such cases, we would have a fallback that is already established in the settings file.
From:
django...@googlegroups.com [mailto:django...@googlegroups.com]
On Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django...@googlegroups.com
Subject: Re: Admin Email From Address
Hi Matthew,
There should be considered following:
1. Not always cod runs with user interaction - worker cases
2. Not always user authenticated
With such cases who the sender should be?
Regards,
Constantine C.
On Nov 15, 2016 12:43 AM, "Matthew Pava" <Matthe...@iss.com> wrote:
I would like to be able to change the ‘from’ address of the admin error emails in production environments to be the email address of the user that generated the error. It would be convenient in triaging errors rather quickly.
I did examine the Django source code, but it doesn’t appear to be possible without writing my own custom function. Any ideas?
Thank you!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAK52boXM8Eg9aDpHOmZOqCHSne55e_DwMYWHRBF%3D086VsNDhbg%40mail.gmail.com.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at
https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e995d53b0f8444fc9b29b95a1a5b45b7%40ISS1.ISS.LOCAL.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK52boXWzqV1eXxcJdETeMJgbo_DoWBp6NWCbEHcmAjOp_Snag%40mail.gmail.com.