From 4fa0bf4b0c3644078fb9b5c3e7f604f6f6e442d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 14 Jul 2019 10:10:26 +0200 Subject: New upstream version 2.0.5 --- mwc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mwc.py') diff --git a/mwc.py b/mwc.py index 6a48317..22a9dca 100755 --- a/mwc.py +++ b/mwc.py @@ -4,6 +4,8 @@ # Copyright: (2013-2017) Michael Till Beck # License: GPL-2.0+ +#test + import io from lxml import etree import hashlib @@ -78,7 +80,7 @@ def sendmail(receiver, subject, content, sendAsHtml, link, encoding=None): else: if link is not None: content = link + '\n\n' + content - mail = MIMEText(content, 'text', encoding) + mail = MIMEText(content, 'plain', encoding) mail['From'] = config.sender mail['To'] = receiver @@ -93,7 +95,7 @@ def sendmail(receiver, subject, content, sendAsHtml, link, encoding=None): if config.smtpusername is not None: mailsession.login(config.smtpusername, config.smtppwd) - mailsession.sendmail(config.sender, receiver.split(','), mail.as_string()) + mailsession.send_message(mail) # returns a list of all content that is stored locally for a specific site @@ -170,7 +172,7 @@ def pollWebsites(): sessionHashes.append(contenthash) changedContents.append(content) - subject = '[' + site['name'] + '] ' + content.title + subject = '[' + site['name'] + '] ' + ("Update available" if content.title is None else content.title) print(' ' + subject) if config.enableMailNotifications and len(fileHashes) > 0: sendAsHtml = (content.contenttype == 'html') -- cgit v1.2.3