From 18b755b8da2172c4e0698fcdb58147a763923211 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 20 Jun 2017 14:24:35 -0500 Subject: [PATCH] fixed #1583, thanks matclab --- gluon/packages/dal | 2 +- gluon/tools.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gluon/packages/dal b/gluon/packages/dal index c1167686..38066734 160000 --- a/gluon/packages/dal +++ b/gluon/packages/dal @@ -1 +1 @@ -Subproject commit c11676867cb3e472e4c37e9a71b6b735f57482d4 +Subproject commit 38066734f71f2cfe8688493ac8e08c6e654e16bc diff --git a/gluon/tools.py b/gluon/tools.py index 9c4d7ef1..b5e896ee 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -776,16 +776,16 @@ class Mail(object): if attachments: result = mail.send_mail( sender=sender, to=origTo, - subject=to_unicode(subject, encoding), body=to_unicode(text, encoding), html=html, + subject=to_unicode(subject, encoding), body=to_unicode(text or '', encoding), html=html, attachments=attachments, **xcc) elif html and (not raw): result = mail.send_mail( sender=sender, to=origTo, - subject=to_unicode(subject, encoding), body=to_unicode(text, encoding), html=html, **xcc) + subject=to_unicode(subject, encoding), body=to_unicode(text or '', encoding), html=html, **xcc) else: result = mail.send_mail( sender=sender, to=origTo, - subject=to_unicode(subject, encoding), body=to_unicode(text, encoding), **xcc) + subject=to_unicode(subject, encoding), body=to_unicode(text or '', encoding), **xcc) else: smtp_args = self.settings.server.split(':') kwargs = dict(timeout=self.settings.timeout)