Send and receive mail with embedded images

620 views
Skip to first unread message

Dani Levin

unread,
Dec 16, 2008, 1:09:11 PM12/16/08
to Google App Engine
Hi!

I want to migrate a mailing solution to Google App Engine. For that I
need to be able to send and receive mails with embedded images.

I already read that it is not possible to receive mail directly, but
there are other solution with urlfetch.

My problem is:
How do I send a mail with embedded image from google app Engine?

Thanks!
Daniel

Jeff S

unread,
Dec 16, 2008, 8:39:17 PM12/16/08
to Google App Engine
Hi Daniel,

When you say embedded images, do you mean as attachments, or an HTML
email with image tags? In either case you may find some helpful
information in the docs for the mail API

http://code.google.com/appengine/docs/mail/emailmessagefields.html
http://code.google.com/appengine/docs/mail/attachments.html

If you are using HTML, the images will need to be hosted somewhere so
that the img src can point to the URL.

Happy coding,

Jeff

Alexander Kojevnikov

unread,
Dec 16, 2008, 9:36:31 PM12/16/08
to Google App Engine
> When you say embedded images, do you mean as attachments, or an HTML
> email with image tags?

I guess Dani means something else:
http://www.systemnetmail.com/faq/4.4.aspx

This method allows to refer to an inline attachment using <img
src="cid:image_content_id"/>.

This is the only way to be sure the recipient actually sees the image
as most MUAs don't display images from external URLs. Also, many MUAs
and MTAs flag such emails as spam (and they have good reasons to do
so).

Daniel Levin

unread,
Dec 17, 2008, 2:41:19 PM12/17/08
to google-a...@googlegroups.com
Alexander,
 Yes, I do refer to the that method (inline attachment using CID). I did it before with PHP without any problem, very easy. Now I want to migrate to Google App Engine, and I don't see how to implement that.

   Any idea?

Regards,
Daniel Levin

Jeff S

unread,
Dec 17, 2008, 4:55:59 PM12/17/08
to Google App Engine
Ah I see. I'm not sure how to do this using the App Engine mail API
either, I'll ask around.

Thank you,

Jeff

Jeff S

unread,
Dec 18, 2008, 2:59:02 PM12/18/08
to Google App Engine
Hi Daniel,

It seems inline attachments with Content ID and MIME Multipart/Related
Content is not supported in the current mail API, but I think it would
be a good idea to file this as a feature request.

Happy coding,

Jeff

Daniel Levin

unread,
Dec 22, 2008, 7:43:20 AM12/22/08
to google-a...@googlegroups.com
Jeff,
   First of all, thank!
  Last thing from this topic: Where should I submit my feature request?

REGARDS!
Daniel Levin

Marzia Niccolai

unread,
Dec 22, 2008, 12:13:53 PM12/22/08
to google-a...@googlegroups.com
Hi,

Feature requests can be filed here:
http://code.google.com/p/googleappengine/issues/list

-Marzia

Alexander Kojevnikov

unread,
Dec 22, 2008, 6:27:16 PM12/22/08
to Google App Engine
Daniel, please post here the link when you submit it, I will
definitely star the issue.

On Dec 23, 4:13 am, Marzia Niccolai <ma...@google.com> wrote:
> Hi,
>
> Feature requests can be filed here:http://code.google.com/p/googleappengine/issues/list
>
> -Marzia
>

Daniel Levin

unread,
Dec 31, 2008, 8:29:30 AM12/31/08
to google-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages