[Zope] sendmail and variable mailto

Shaw, Howard ShawH@STHS.org
Sat, 13 Feb 1999 15:31:35 -0600


This seems intuitively obvious... it just doesn't work...

<!--#with REQUEST-->
 <!--#sendmail smpthost="localhost" mailto=home_emails subject="this and
that"-->
Nothing much.
 <!--#/sendmail-->
<!--#/with-->

where home_emails is a variable from a form.

I tried a test using
<!--#with "_.namespace(mailto='me@my.address.org')"-->
 <!--#sendmail smpthost="localhost" subject="this and that"-->
Nothing much.
 <!--#/sendmail-->
<!--#/with-->

and 

<!--#with "_.namespace(mailto='me@my.address.org')"-->
 <!--#sendmail smpthost="localhost" mailto=mailto subject="this and
that"-->
Nothing much.
 <!--#/sendmail-->
<!--#/with-->

Please help. I really need to be able to selectively send mail to either
home_emails or b_emails or neither, depending on which actually contains
a value. If I can't include a variable as a mailto, can I set the folder
attribute 'mailto' from within the script on the basis of the same
selection, then use sendmail with on mailto? Will it find it then? The
example in the DTML User's Guide implies it would, but I don't know how
to set the folder attributes dynamically.