forked from CGM_Public/pretix_original
Do not show subject prefix in HTML email headline
This commit is contained in:
@@ -132,7 +132,7 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
|
|||||||
else:
|
else:
|
||||||
sender = formataddr((settings.PRETIX_INSTANCE_NAME, sender))
|
sender = formataddr((settings.PRETIX_INSTANCE_NAME, sender))
|
||||||
|
|
||||||
subject = str(subject)
|
subject = raw_subject = str(subject)
|
||||||
signature = ""
|
signature = ""
|
||||||
|
|
||||||
bcc = []
|
bcc = []
|
||||||
@@ -198,13 +198,13 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if 'position' in inspect.signature(renderer.render).parameters:
|
if 'position' in inspect.signature(renderer.render).parameters:
|
||||||
body_html = renderer.render(content_plain, signature, str(subject), order, position)
|
body_html = renderer.render(content_plain, signature, raw_subject, order, position)
|
||||||
else:
|
else:
|
||||||
# Backwards compatibility
|
# Backwards compatibility
|
||||||
warnings.warn('E-mail renderer called without position argument because position argument is not '
|
warnings.warn('E-mail renderer called without position argument because position argument is not '
|
||||||
'supported.',
|
'supported.',
|
||||||
DeprecationWarning)
|
DeprecationWarning)
|
||||||
body_html = renderer.render(content_plain, signature, str(subject), order)
|
body_html = renderer.render(content_plain, signature, raw_subject, order)
|
||||||
except:
|
except:
|
||||||
logger.exception('Could not render HTML body')
|
logger.exception('Could not render HTML body')
|
||||||
body_html = None
|
body_html = None
|
||||||
|
|||||||
Reference in New Issue
Block a user