[Zope] sendmail with dtml-var

Dirk Datzert dirk.datzert@tks-rasselstein.thyssenkrupp.com
Fri, 31 May 2002 22:35:35 +0200


Hi Joshua,

try it with mail_group = ['"first last" <person@here.comY', '"first2
last2" <person2@there.com>']
and report if it works.

Regards,
Dirk

Joshua Newman schrieb:
> 
> I made a variable 'mail_group' which appears in <dtml-var REQUEST> as:
> ['first last <person@here.com>','first2 last2 <person2@there.com>']
> 
> and I want to use <dtml-sendmail>  so I have:
> 
> <dtml-let addr="_.string.join(mail_group,',')">
> <dtml-sendmail mailhost="MailHost">
> 
> To: <dtml-var addr html_quote>
> Subject: Feedback from somewhere
> from: trying@somewhere.com
> Comments:<dtml-var comments>
> 
> </dtml-sendmail>
> </dtml-let>
> 
> But I'm getting totally impenetrable errors:
> 
> <dtml-var addr html_quote> renders perfectly to:
> first last <person@here.com.,first2 last2 <person2@there.com>
> 
> and if I cut and paste the above line to the 'To:' field, mail is sent
> perfectly.
> 
> BUT when i run the above sendmail script I get a page that says only:
> {'first': (550, '5.1.1 ... User unknown')}
> 
> If there is just one name in 'mail_group' I get an even weirder page:
> 
> {'f': (550, '5.1.1 ... User unknown'), 'i': (550, '5.1.1 ... User
> unknown'), 'r': (550, '5.1.1 ... User unknown'), 's': (550, '5.1.1
> ... User unknown', 't': (550, '5.1.1 ... User unknown')}
> 
> I am totally perplexed.  And SUPER frustrated.
> Can someone tell me why this is and how to fix it if possible.
> 
> thanks
> joshua
> 
> p.s. if I use
> To: <dtml-in mail_group><dtml-var sequence-item><dtml-var addr html_quote><dtml-unless sequence-end>, </dtml-unless></dtml-in>
> 
> I get an error like:
> Error Type: TypeError
> Error Value: len() of unsized object
> 
> which I think is because of trailing spaces though I can't see any...
> 
> _______________________________________________
> 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 )