mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-19 12:24:40 +02:00
feat(emails): Do not auto-reply on auto-replies and add auto-reply header for auto-replies and fix headers propagation for our email messages
This commit is contained in:
@@ -15,7 +15,7 @@ def send_templated_mail(template_name,
|
||||
bcc=None,
|
||||
fail_silently=False,
|
||||
files=None,
|
||||
extra_headers={}):
|
||||
extra_headers=None):
|
||||
"""
|
||||
send_templated_mail() is a wrapper around Django's e-mail routines that
|
||||
allows us to easily send multipart (text/plain & text/html) e-mails using
|
||||
@@ -53,6 +53,8 @@ def send_templated_mail(template_name,
|
||||
from helpdesk.settings import HELPDESK_EMAIL_SUBJECT_TEMPLATE, \
|
||||
HELPDESK_EMAIL_FALLBACK_LOCALE
|
||||
|
||||
headers = extra_headers or {}
|
||||
|
||||
locale = context['queue'].get('locale') or HELPDESK_EMAIL_FALLBACK_LOCALE
|
||||
|
||||
try:
|
||||
@@ -95,7 +97,8 @@ def send_templated_mail(template_name,
|
||||
|
||||
msg = EmailMultiAlternatives(subject_part, text_part,
|
||||
sender or settings.DEFAULT_FROM_EMAIL,
|
||||
recipients, bcc=bcc)
|
||||
recipients, bcc=bcc,
|
||||
headers=headers)
|
||||
msg.attach_alternative(html_part, "text/html")
|
||||
|
||||
if files:
|
||||
|
Reference in New Issue
Block a user