summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorDaniel Dent <sourcecode@contactdaniel.net>2017-04-04 23:09:38 -0700
committerDaniel Dent <sourcecode@contactdaniel.net>2017-04-05 21:01:08 -0700
commit5058292537b2e18660d0db86ffaa042c503eb81d (patch)
treea1b94d8c940f329e544da92a3a89a9ed07fff802 /synapse/push
parentMerge pull request #2098 from matrix-org/erikj/repl_tcp_fix (diff)
downloadsynapse-5058292537b2e18660d0db86ffaa042c503eb81d.tar.xz
Support authenticated SMTP
Closes (SYN-714) #1385

Signed-off-by: Daniel Dent <matrixcontrib@contactdaniel.net>
Diffstat (limited to '')
-rw-r--r--synapse/push/mailer.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 3a50c72e0b..f83aa7625c 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -200,7 +200,11 @@ class Mailer(object):
         yield sendmail(
             self.hs.config.email_smtp_host,
             raw_from, raw_to, multipart_msg.as_string(),
-            port=self.hs.config.email_smtp_port
+            port=self.hs.config.email_smtp_port,
+            requireAuthentication=self.hs.config.email_smtp_user is not None,
+            username=self.hs.config.email_smtp_user,
+            password=self.hs.config.email_smtp_pass,
+            requireTransportSecurity=self.hs.config.require_transport_security
         )
 
     @defer.inlineCallbacks