Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dax/jmc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Rousselie <dax@happycoders.org>2007-06-19 23:44:16 +0400
committerDavid Rousselie <dax@happycoders.org>2007-06-19 23:44:16 +0400
commit65386a62c3a701a297496d42624f2f83b511af67 (patch)
treef3292ad53620d5732bc58907a868d7403e817045 /src
parent9da0d0a7d1db7bbd191ec9a41518dddbfebe2876 (diff)
Prevent to send email with subject
darcs-hash:20070619194416-86b55-897322bd4ab57664da46e20afd5a3bc6befe5a8a.gz
Diffstat (limited to 'src')
-rw-r--r--src/jmc/model/account.py2
1 files changed, 2 insertions, 0 deletions
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))