From f1547486c0d372dea3626c1a92d897a3e3988b9d Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 20 Mar 2015 13:34:43 -0500 Subject: [PATCH] fixed attachment on GAE --- gluon/tools.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gluon/tools.py b/gluon/tools.py index 22bbbd44..35f65d0a 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -775,11 +775,12 @@ class Mail(object): xcc['bcc'] = bcc if reply_to: xcc['reply_to'] = reply_to - from google.appengine.api import mail, Attachment - attachments = attachments and [Attachment(a.my_filename, - a.my_payload, - contebt_id='' % k) - for k,a in enumerate(attachments) if not raw] + from google.appengine.api import mail + attachments = attachments and [mail.Attachment( + a.my_filename, + a.my_payload, + contebt_id='' % k + ) for k,a in enumerate(attachments) if not raw] if attachments: result = mail.send_mail( sender=sender, to=origTo,