From 65386a62c3a701a297496d42624f2f83b511af67 Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Tue, 19 Jun 2007 21:44:16 +0200 Subject: [PATCH] Prevent to send email with subject darcs-hash:20070619194416-86b55-897322bd4ab57664da46e20afd5a3bc6befe5a8a.gz --- src/jmc/model/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jmc/model/account.py b/src/jmc/model/account.py index 9edae05..e0c0b92 100644 --- a/src/jmc/model/account.py +++ b/src/jmc/model/account.py @@ -637,6 +637,8 @@ class SMTPAccount(Account): def create_email(self, from_email, to_email, subject, body): """Create new email""" email = MIMEText(body) + if subject is None: + subject = "" email['Subject'] = Header(str(subject)) email['From'] = Header(str(from_email)) email['To'] = Header(str(to_email))