Zope 2.6 - RE: [Zope] Sending e-mail attachments through a python script

Tino Wildenhain tino@wildenhain.de
Wed, 17 Apr 2002 12:20:32 +0200


Hi,

--On Mittwoch, 17. April 2002 10:19 +0200 Maik Jablonski 
<maik.jablonski@uni-bielefeld.de> wrote:

> On Tue, 16 Apr 2002 22:23:35 -0400 "Trevor Toenjes" <zope@toenjes.com>
> wrote:
>
>> > If you use the MIMETools-<dtml-sendmail>-tag, you can't attach several
>> > attachments to one mail. maybe you should have a look at the
>> > NMIMETools at
>> This is misleading.  You can attach several attachments with the sendmail
>> tag.  I have many scripts that do it.
>
> you are right, trevor... sorry for my wrong description...
>
>> What you can't do...is loop <dtml-boundary> to programmatically add
>> multiple attachments.
>
> that's what I meant...;-)
>
>> Maik, I like your nmime idea.  Would it be difficult for you to
>> alter/patch the Zope core to add an end-tag to <dtml-boundary>, making
>> it a block tag? Adding a </dtml-boundary> would solve the problem in
>> Zope, and would be a great addition to 2.6.
>
> my problem is: when I patch the core-code so that it understands only a
> <dtml-boundary>...</dtml-boundary>, this might break existing code. and I
> haven't worked it out to do something like: if only a single
> <dtml-boundary> is found, do it the old way, if a
> <dtml-boundary>...</dtml-boundary> exists, do it the new way.
>
> so what to do?

It would not break existing code if nobody is using the
dtml scripting in new code anyway :)
Even sending mail is much cleaner in
Python Scripts.

See MailHostObject.send( messageText, mto, mfrom, subject,encode)

Regards
Tino Wildenhain