mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 20:35:00 -04:00
Add a setting to disable TLS for sending email (#10546)
This is mostly useful in case the server offers TLS, but doesn't present a valid certificate.
This commit is contained in:
parent
f5a368bb48
commit
74d7336686
8 changed files with 138 additions and 50 deletions
|
@ -45,14 +45,6 @@ class EmailPusherTests(HomeserverTestCase):
|
|||
|
||||
def make_homeserver(self, reactor, clock):
|
||||
|
||||
# List[Tuple[Deferred, args, kwargs]]
|
||||
self.email_attempts = []
|
||||
|
||||
def sendmail(*args, **kwargs):
|
||||
d = Deferred()
|
||||
self.email_attempts.append((d, args, kwargs))
|
||||
return d
|
||||
|
||||
config = self.default_config()
|
||||
config["email"] = {
|
||||
"enable_notifs": True,
|
||||
|
@ -75,7 +67,17 @@ class EmailPusherTests(HomeserverTestCase):
|
|||
config["public_baseurl"] = "aaa"
|
||||
config["start_pushers"] = True
|
||||
|
||||
hs = self.setup_test_homeserver(config=config, sendmail=sendmail)
|
||||
hs = self.setup_test_homeserver(config=config)
|
||||
|
||||
# List[Tuple[Deferred, args, kwargs]]
|
||||
self.email_attempts = []
|
||||
|
||||
def sendmail(*args, **kwargs):
|
||||
d = Deferred()
|
||||
self.email_attempts.append((d, args, kwargs))
|
||||
return d
|
||||
|
||||
hs.get_send_email_handler()._sendmail = sendmail
|
||||
|
||||
return hs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue