fixed attachment on GAE
This commit is contained in:
+6
-5
@@ -775,11 +775,12 @@ class Mail(object):
|
|||||||
xcc['bcc'] = bcc
|
xcc['bcc'] = bcc
|
||||||
if reply_to:
|
if reply_to:
|
||||||
xcc['reply_to'] = reply_to
|
xcc['reply_to'] = reply_to
|
||||||
from google.appengine.api import mail, Attachment
|
from google.appengine.api import mail
|
||||||
attachments = attachments and [Attachment(a.my_filename,
|
attachments = attachments and [mail.Attachment(
|
||||||
a.my_payload,
|
a.my_filename,
|
||||||
contebt_id='<attachment-%s>' % k)
|
a.my_payload,
|
||||||
for k,a in enumerate(attachments) if not raw]
|
contebt_id='<attachment-%s>' % k
|
||||||
|
) for k,a in enumerate(attachments) if not raw]
|
||||||
if attachments:
|
if attachments:
|
||||||
result = mail.send_mail(
|
result = mail.send_mail(
|
||||||
sender=sender, to=origTo,
|
sender=sender, to=origTo,
|
||||||
|
|||||||
Reference in New Issue
Block a user