From 9aaaa1b1030f7d9a4e67548ebd0992728c8df230 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 31 Jan 2022 08:02:53 +0530 Subject: [PATCH] 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 --- src/calibre/gui2/email.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/email.py b/src/calibre/gui2/email.py index 5527226005..da6b81edec 100644 --- a/src/calibre/gui2/email.py +++ b/src/calibre/gui2/email.py @@ -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,