Commit 55f8026f authored by Nicolas Dumazet's avatar Nicolas Dumazet

set In-Reply-To header out outgoing email when DestinationReference is set on the document


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42776 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fd881063
...@@ -626,6 +626,8 @@ class EmailDocument(TextDocument): ...@@ -626,6 +626,8 @@ class EmailDocument(TextDocument):
if not _checkPermission(Permissions.View, self): if not _checkPermission(Permissions.View, self):
raise Unauthorized raise Unauthorized
additional_headers = {}
# #
# Build mail message # Build mail message
# This part will be replaced with MailTemplate soon. # This part will be replaced with MailTemplate soon.
...@@ -652,9 +654,13 @@ class EmailDocument(TextDocument): ...@@ -652,9 +654,13 @@ class EmailDocument(TextDocument):
# Return-Path # Return-Path
if reply_url is None: if reply_url is None:
reply_url = self.portal_preferences.getPreferredEventSenderEmail() reply_url = self.portal_preferences.getPreferredEventSenderEmail()
additional_headers = None
if reply_url: if reply_url:
additional_headers = {'Return-Path':reply_url} additional_headers['Return-Path'] = reply_url
# Reply-To
destination_reference = self.getDestinationReference()
if destination_reference is not None:
additional_headers['In-Reply-To'] = destination_reference
# To (multiple) # To (multiple)
to_url_list = [] to_url_list = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment