Browse Source

Add label to Mail Reply-to header in notification

Guénaël Muller 7 years ago
parent
commit
3c8196934c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tracim/tracim/lib/notifications.py

+ 4 - 1
tracim/tracim/lib/notifications.py View File

@@ -289,12 +289,15 @@ class EmailNotifier(object):
289 289
             subject = subject.replace(EST.WORKSPACE_LABEL, main_content.workspace.label.__str__())
290 290
             subject = subject.replace(EST.CONTENT_LABEL, main_content.label.__str__())
291 291
             subject = subject.replace(EST.CONTENT_STATUS_LABEL, main_content.get_status().label.__str__())
292
+            reply_to_label = l_('{username} in workspace {workspace}').format(
293
+                username=user.display_name,
294
+                workspace=main_content.workspace.label)
292 295
 
293 296
             message = MIMEMultipart('alternative')
294 297
             message['Subject'] = subject
295 298
             message['From'] = self._get_sender(user)
296 299
             message['To'] = to_addr
297
-            message['Reply-to'] = formataddr(('',replyto_addr))
300
+            message['Reply-to'] = formataddr((reply_to_label, replyto_addr))
298 301
             # INFO - G.M - 2017-11-15
299 302
             # References can theorically have label, but in pratice, references
300 303
             # contains only message_id from parents post in thread.