From d705d79226faf418866f674ac75a52b1affce452 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Fri, 14 Sep 2018 09:47:38 +0100 Subject: [PATCH] Read imap server from creds file also --- syndicate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syndicate.py b/syndicate.py index ea9b331..b98efa3 100644 --- a/syndicate.py +++ b/syndicate.py @@ -31,7 +31,6 @@ def process_mailbox(M): return mails, n_failures -M = imaplib.IMAP4_SSL('outlook.office365.com') mailboxes = ['Notifications/NPPC/Updates', 'Notifications/NPPC/Uptime', 'Notifications/NPPC/Icinga'] credential_file = './account' @@ -41,6 +40,8 @@ with open(credential_file) as f: creds = [line.rstrip('\n') for line in creds] +M = imaplib.IMAP4_SSL(creds[2]) + try: M.login(creds[0], creds[1]) except imaplib.IMAP4.error: -- 2.46.2