summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-04-10 17:58:47 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-04-17 14:42:20 +0100
commit20f0617e87924c929f0db0c06d30de0c8d15081c (patch)
tree813206ef9ad64726925d976d74dbcf6afa8167c3 /synapse/push/mailer.py
parentAdd account expiration feature (diff)
downloadsynapse-20f0617e87924c929f0db0c06d30de0c8d15081c.tar.xz
Send out emails with links to extend an account's validity period
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r--synapse/push/mailer.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 1eb5be0957..c269bcf4a4 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -521,11 +521,11 @@ def format_ts_filter(value, format):
     return time.strftime(format, time.localtime(value / 1000))
 
 
-def load_jinja2_templates(config):
+def load_jinja2_templates(config, template_html_name, template_text_name):
     """Load the jinja2 email templates from disk
 
     Returns:
-        (notif_template_html, notif_template_text)
+        (template_html, template_text)
     """
     logger.info("loading email templates from '%s'", config.email_template_dir)
     loader = jinja2.FileSystemLoader(config.email_template_dir)
@@ -533,14 +533,10 @@ def load_jinja2_templates(config):
     env.filters["format_ts"] = format_ts_filter
     env.filters["mxc_to_http"] = _create_mxc_to_http_filter(config)
 
-    notif_template_html = env.get_template(
-        config.email_notif_template_html
-    )
-    notif_template_text = env.get_template(
-        config.email_notif_template_text
-    )
+    template_html = env.get_template(template_html_name)
+    template_text = env.get_template(template_text_name)
 
-    return notif_template_html, notif_template_text
+    return template_html, template_text
 
 
 def _create_mxc_to_http_filter(config):