[Zope] text and html emails from zope

Dieter Maurer dieter@handshake.de
Fri, 4 Jul 2003 20:26:58 +0200


Norman Khine wrote at 2003-6-30 19:03 +0100:
 > i am trying to create an email from zope that can send the email in
 > both plain text and html, so that users who only use text can view
 > it, as well as those who have html enabled.
 > 
 > how do i seperate the two within the <dtml-sendmail> tag.

Please look for "MIME" support (--> "dtml-mime").
You need a "Content-Type: multipart/alternative").

 > can i just put the
 > <dtml-sendmail>
 > text bit before the html
 > 
 > <dtml-mime type="text/html" encode="7bit">
 > this part for the html
 > </dtml-mime>
 > 
 > </dtml-sendmail>

This will not work.

You must construct a "multipart/alternative" MIME message.
It consists of two embedded messages: the first (!)
"text/plain" and the second "text/html".

I do not know the details and would need to look them up.
But surely, you can do that yourself ;-)


Dieter