[Zope] Re: Easy <dtml-sendmail> syntax question.

Maik Jablonski maik.jablonski@uni-bielefeld.de
Sun, 29 Sep 2002 17:51:59 +0200


Derek Basch wrote:

> <dtml-var standard_html_header>
> 
> <dtml-sendmail smtphost=<dtml-var smtphost>>
> To: <<dtml-var recipient>>
> From: Server <<dtml-var SERVER_URL>>
> Subject: <<dtml-var subject>>
> 
> </dtml-sendmail>
> _____________________________________________
> I cant save the 'send_email' mehtod so know I am doing
> something wrong by nesting the <dtml-var smtphost> 
> inside <dtml-sendmail>. Can anyone tell me how to do
> this properly?

you can't use smtphost=<dtml-var smtphost>. it expects a string, not an 
expression. If you want to use different smtp-hosts, you have to do a 
workaround:

- get the smtphost from your request,
- set this as the smtphost of MailHost-object
- and then call your method with <dtml-var mailhost=MailHost>

cheers, maik

-- 
Maik Jablonski                 __o
www.zfl.uni-bielefeld.de     _ \<_    Deutsche Zope User Group
Bielefeld, Germany          (_)/(_)               www.dzug.org