Replace smtp.live.com with smtp-mail.outlook.com when sending mail from the GUI so users dont all hve to change their email settings

This commit is contained in:
Kovid Goyal 2022-01-31 08:02:53 +05:30
parent e1730e1a3b
commit 9aaaa1b103
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -129,9 +129,14 @@ class Sendmail:
except Exception:
pass
relay = opts.relay_host
if relay and relay == 'smtp.live.com':
# Microsoft changed the SMTP server
relay = 'smtp-mail.outlook.com'
sendmail(msg, efrom, eto, localhost=None,
verbose=1,
relay=opts.relay_host,
relay=relay,
username=opts.relay_username,
password=from_hex_unicode(opts.relay_password), port=opts.relay_port,
encryption=opts.encryption,