From 9683d50f36faf34e5f829e19424ec5c56cfa1118 Mon Sep 17 00:00:00 2001 From: Jonathan Rehm Date: Tue, 11 Jul 2017 07:16:19 -0700 Subject: [PATCH] Send mail from the FROM address instead of the login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When SMTP is configured to use a service that doesn't use an email address to log in – e.g. AWS SES or Postmark – the sendmail request fails saying the FROM address is invalid. --- cps/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/helper.py b/cps/helper.py index 765448bf..c50279ef 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -176,7 +176,7 @@ def send_raw_email(kindle_mail, msg): if settings["mail_password"]: mailserver.login(settings["mail_login"], settings["mail_password"]) - mailserver.sendmail(settings["mail_login"], kindle_mail, msg) + mailserver.sendmail(settings["mail_from"], kindle_mail, msg) mailserver.quit() smtplib.stderr = org_stderr