forked from CGM_Public/pretix_original
Set Reply-To headers to the event's contact address
This commit is contained in:
@@ -63,6 +63,8 @@ def mail(email: str, subject: str, template: str,
|
|||||||
if email == INVALID_ADDRESS:
|
if email == INVALID_ADDRESS:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
headers = headers or {}
|
||||||
|
|
||||||
with language(locale):
|
with language(locale):
|
||||||
if isinstance(context, dict) and order:
|
if isinstance(context, dict) and order:
|
||||||
try:
|
try:
|
||||||
@@ -103,6 +105,9 @@ def mail(email: str, subject: str, template: str,
|
|||||||
htmlctx['event'] = event
|
htmlctx['event'] = event
|
||||||
htmlctx['color'] = event.settings.primary_color
|
htmlctx['color'] = event.settings.primary_color
|
||||||
|
|
||||||
|
if event.settings.mail_from == settings.DEFAULT_FROM_EMAIL and event.settings.contact_mail:
|
||||||
|
headers['Reply-To'] = event.settings.contact_mail
|
||||||
|
|
||||||
prefix = event.settings.get('mail_prefix')
|
prefix = event.settings.get('mail_prefix')
|
||||||
if prefix:
|
if prefix:
|
||||||
subject = "[%s] %s" % (prefix, subject)
|
subject = "[%s] %s" % (prefix, subject)
|
||||||
|
|||||||
Reference in New Issue
Block a user