[Zope] Re:Sendmail Error.It works for me.

Paul Zwarts paul.zwarts@oratrix.com
Wed, 21 Mar 2001 14:28:06 +0100


The only thing to consider is whether you want each user to know what other users the mail was sent to. You can put the whole
string in the bcc column to initiate it as one call to the mail server, but show each person they were bccd OR you can use the
<dtml-in> loop over the whole sendmail block so each person is mailed individually. Its pretty much a breach of company/client
trust to allow clients to see what other clients are in the list, pending the type of information sent. Only problem with
<dtml-in is large batches will eventually raise an error if too big. I think you can bypass that by writing it into an external
script.

Cheers,
Paz

karthick ramanarayanan wrote:

> Hi,
>  I have used dtml-sendmail with multiple To: addresses,fetched from the database without any problems.
> After you fetch the email Object list from the data Base,
> convert the object List into a list of strings and join the list with commas.Then use the dtml-sendmail tag to send the mail.
> You can do this,assuming your sql_query returns a list of Emails.
> Assuming that your query is called sql_get_emails,and it contains a field called email,do this,
>
> <dtml-call "REQUEST.set('mylist',[])">
> <dtml-in sql_get_emails>
> <dtml-call "mylist.append(email)">
> </dtml-in>
> <dtml-let mailString="_.string.join(mylist,',')" >
> Now use this mailString to send the mail.
> I do this,after fetching mailString,
>
> <dtml-sendmail smtphost="mail.pepco.no">
> To: <dtml-var mailString>
> From: <dtml-var from>
> Subject: <dtml-var subject>
> <dtml-var body>
> </dtml-sendmail>
> </dtml-let>
>
> I hope that you dont get frustrated after this.
>
> Bye,
> A.R.K
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )