Merge branch 'master' of github.com:web2py/web2py

This commit is contained in:
mdipierro
2013-08-24 05:18:52 -05:00
+2 -2
View File
@@ -429,13 +429,13 @@ class Mail(object):
html = html.decode(encoding).encode('utf-8')
# Construct mime part only if needed
if text and html:
if text is not None and html:
# We have text and html we need multipart/alternative
attachment = MIMEMultipart.MIMEMultipart('alternative')
attachment.attach(MIMEText.MIMEText(text, _charset='utf-8'))
attachment.attach(
MIMEText.MIMEText(html, 'html', _charset='utf-8'))
elif text:
elif text is not None:
attachment = MIMEText.MIMEText(text, _charset='utf-8')
elif html:
attachment = \