[Zope] question on simple_send in MailHost

Tino Wildenhain tino at wildenhain.de
Wed Jul 19 04:51:20 EDT 2006

Andreas Jung wrote:
> --On 18. Juli 2006 21:55:36 -1000 John Schinnerer <john at eco-living.net> 
> wrote:
>> Aloha,
>> I did try send() - it seems one must know something about RFC822 message
>> formatting to use it...?
>> I know nothing about that, and could not quickly find any clear and
>> concise howtos or tutorials, just verbose and confusing specs and mailing
>> list posts and so on.
> Nonsense. The Python 'email' module is perfectly suited and documented 
> (with examples). We use the 'email' module in various places for 
> generating rfc822 compliant emails that are send through MailHost.send().

So you are writing a Product to enable it to python scripting? .-))

Well, its so easy... some of the beginners should be able to do it.

from AccessControl import allow_module, allow_class, allow_type

from formatter import BlockFormatter
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Header import Header
from MailCrypt import signmail
from email.Encoders import encode_base64


would roughly do it.
Pack it nicely, add some ZMI howtos
and be ready :-)

Tino Wildenhain

More information about the Zope mailing list