From 82574d2118fb11af022650507ddb49e689290384 Mon Sep 17 00:00:00 2001 From: janeczku Date: Fri, 17 Jun 2016 21:32:00 +0200 Subject: [PATCH] Support SMTP without authentication --- cps/helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/helper.py b/cps/helper.py index 96259d9a..4f8364a8 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -126,7 +126,8 @@ def send_mail(book_id, kindle_mail): mailserver.starttls() mailserver.ehlo() - mailserver.login(settings["mail_login"], settings["mail_password"]) + if settings["mail_password"]: + mailserver.login(settings["mail_login"], settings["mail_password"]) mailserver.sendmail(settings["mail_login"], kindle_mail, msg) mailserver.quit() except (socket.error, smtplib.SMTPRecipientsRefused, smtplib.SMTPException), e: