[Zope] E-Mails
Michel Pelletier
michel@digicool.com
Wed, 19 May 1999 15:24:02 -0400
> -----Original Message-----
> From: rheal.dugas@can.xerox.com [mailto:rheal.dugas@can.xerox.com]
> Sent: Wednesday, May 19, 1999 2:55 PM
> To: zope@zope.org
> Subject: [Zope] E-Mails
>
>
> I've setup a sql database similar to a guestbook that
> customers can fill out.
>
> What I want to be able to do is search for a ceratain field
> in the database and then e-mails a file (ie PDF) or just a
> plain text file to all the people that the search found. The
> e-mail address is in the database.
>
> Can anyone help me out?
>
This will require a variety of tools, an ZSQL method to return a list of
email addresses to be mailed to, which will be iterated in an <!--#in-->
tag over a <!--#sendmail--> tag which used the <!~--#mime--> tag to
attach your file (untested):
<!--#in mySQLQuery-->
<!--#sendmail-->
To: <!--#var sequence-item-->
From: me@here.com
<!--#mime encode=7bit type=text/plain-->
Here's your file.
<!--#boundary encode=base64 type=application/adobe-pdf
disposition=attachment--><!--#var "fileobject.read()"--><!--#/mime-->
<!--#/sendmail-->
<!--#/in-->
Note, starting at the boundary tag to the /mime tag it is all one line,
otherwise you will introduce unwanted newlines in your mime body which
will break it. Also, the mime tag is new in 1.11pr1. Also, I have know
idea what the mime type of a pdf file is, I made applcation/adobe-pdf
up.
-Michel
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>