send an email with picture/rich text format in the body

Heiko Wundram me+python at modelnine.org
Sun May 14 08:39:04 EDT 2006


Am Sonntag 14 Mai 2006 13:24 schrieb anya:
> I want to send an email message with picture in it.

This...

> I dont want to put 
> it as
> attachment but make it in the body of the mail, so every one who open
> the email will see the picture..

will...

> (it is possible that the solution will 
> be in any other format that will be opened i.e pdf, doc and I will put
> this in the body )

never...

> Neither in MimeWriter nor using the definition of MymeTypes I was able
> to do it ..

work.

That is, unless you design your own MIME standard, and get all email clients 
out there to read your type of "structured document," which you inherently 
need for including pictures directly in an email (body), as MIME (as we know 
it today) only knows about stacked message parts, not about message content 
and higher level formatting.

Basically, to include a picture in a body today, there's concensus that you 
insert a HTML-document into one MIME part, and an <img> link refers to the 
attachment that comes in another MIME part (by the filename, which is the 
same as for the attached MIME part). But, as you see, this specifically 
requires that the recipient is able to view HTML mails (which quite a lot of 
people, even those using M$ Outlook, have turned off by default).

Anyway, read Ben Finney's response carefully. If you're trying to send out 
commercial email, I'll be the first person to dump your mail if it doesn't at 
least come in a format I can read (and understand!) text-only.

--- Heiko.



More information about the Python-list mailing list