raise error instead of sending email to no one
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Thu, 10 Dec 2015 23:08:37 +0000 (18:08 -0500)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Thu, 10 Dec 2015 23:08:37 +0000 (18:08 -0500)
... when the processed email contains no from address

edward

diff --git a/edward b/edward
index ba4b947892f49c15bafdaf43bc02968452c20526..4f782c6c1a93b58c08a942ce231f745b70c4682d 100755 (executable)
--- a/edward
+++ b/edward
@@ -1368,6 +1368,9 @@ def send_reply(email_txt, reply_to, reply_from):
         Email is sent
     """
 
+    if reply_to == None:
+        error("*** ERROR: No one to send email to.")
+        exit(1)
 
     s = smtplib.SMTP('localhost')
     s.sendmail(reply_from, reply_to, email_txt)