Easy <dtml-sendmail> syntax question.
Hello, I have been playing with dtml-senmail for the first time and I have gotten stuck on something. I have a DTML Method named 'send_email_setup' with: _____________________________________________ <dtml-var standard_html_header> <form action="send_email"> SMTP Host: <input type="text" name="smtphost"><br> Send To: <input type="text" name="recipient"><br> Subject: <input type="text" name="subject"><br> <input type="submit"> </form> _____________________________________________ which calls the 'send_email' DTML Method: _____________________________________________ <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? Thanks, Derek Basch __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com
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
participants (2)
-
Derek Basch -
Maik Jablonski