summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-06-02 21:34:40 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-06-02 21:34:40 +0100
commit79d1f072f4fc9a6b2e9773e8cb700b26bc2dff51 (patch)
treedf24b627da54201ce8df7be7fde3410ec36d4d70 /synapse/push
parentadd some branding debugging (diff)
downloadsynapse-79d1f072f4fc9a6b2e9773e8cb700b26bc2dff51.tar.xz
brand the email from header
Diffstat (limited to '')
-rw-r--r--synapse/push/mailer.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 944f3b481d..c1e9057eb6 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -97,7 +97,14 @@ class Mailer(object):
 
     @defer.inlineCallbacks
     def send_notification_mail(self, user_id, email_address, push_actions, reason):
-        raw_from = email.utils.parseaddr(self.hs.config.email_notif_from)[1]
+        try:
+            from_string = self.hs.config.email_notif_from % {
+                "app": self.app_name
+            }
+        except TypeError:
+            from_string = self.hs.config.email_notif_from
+
+        raw_from = email.utils.parseaddr(from_string)[1]
         raw_to = email.utils.parseaddr(email_address)[1]
 
         if raw_to == '':