Hi,
I am receiving multipart message in Post. I have parsed the message
and have extracted different mail parts.
And on of the part was
-------------------------------------------
"content-type: image/gif
content-transfer-encoding: base64
content-id: <image_1.gif>

R0lGODlhdQAqALMAAGq12qHQ6Mnk8UGgz/L5/E2m0+Xy
+a7X64XC4Fqt1tns9ZHI5He73bvd7jOZ
zP///ywAAAAAdQAqAAAE//DJSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//
AoHBILBqP
yKRyyWw6n9CodEqtWq8cwiFAwN4EiIHDkfDODIvCeO0wvwiBBJuNcLMUjPm6EDAQFQICJgaBXSZq
cwMIgisAjo8ABw8HkAAIfg8LjhMBiGMLD3CIBZJwcg4FoA8KAHSGjwESrAAKGWJrDAddBp0Dkid6
DrEBegN+rW0PCGsDYrGnBa2xyNEDsQa3CYhlD2x
+AmOMFwcDfH5ayGsoY4uBAn7EDoILY5LIDw1j
A4wEgJ8TBgywA6hsTCwCyCTReQBOXocGy4qtE2YhnqB8Dho8uJfHIQUF
+v10SSAQ0tADNQMmNKyj
bwyhcBoULLiVCEEtYHoExUsAQAy3e/
cspHPAoEvEMQxqjQFAYWk3YWoWwcRAL1gkkzjn6NRzE+gY
DAdOOWA6qSOqp2QlODV4wODUC3rMhQrAZWKsCvECNBDDQMK9iL8uGEBEwcApBacMYQRl8KSDW
+KE
6rMpoYFZbiYa44UZscs9kI9FBpx0jvC7UMh4sSNgGGbjtmsiV4CjcdVMPRPnDIOJcdrXSXr66mE8
h6zYNao0e5JtgdfxhVnZ7Pboc
+PvVQhGTct2l8EtPibjLK399G5DjxfwBEO1AJMdFZ6YLXrvguZY
kfRdkJObv79/ChEAADs="
---------------------------------------------
I have parsed it in the message object and i can easily get header
fields and payload.
Now I want to send mail using google app engine mail api.
I have make an attachment like this
-------------------------
                    fileTuple =[]
                    fileTuple.insert(0, fileName)
                    fileTuple.insert(1,payload)
                    attachments = []
                    attachments.append(fileTuple)

        emailMsgObj = mail.EmailMessage()
        emailMsgObj.sender = "sen...@gmail.com>"
        emailMsgObj.to = "ton...@gmail.com"
        emailMsgObj.subject = subject
        emailMsgObj.body = bodyText
        emailMsgObj.attachments = attachments_in
        emailMsgObj.send()
----------------------------------
BUT when i get the mail and see the attached file , the image is not
correct, dont get image.

So first of all i m getting post request and image is encoded in
base64, as we can see from the above.
But when i want to attach it in the mail, should i need to decode it,
or siple send the payload.
i have tried different things, i tried encoding, decoding, and
original payload, but i never get the image in the mail.
If anybody has tried to send image as attachment, please suggest me
some good way and if possible send me code.
thnks




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to