Re: [Zope] sendmail host hardcoded ?
Gijs Reulen writes:
I am trying to pass a variable with the hostname to the smtphost parameter of sendmail: ... <dtml-sendmail smtphost="PARENTS[_.len(PARENTS)-1].getProperty('mail_smtphost')"> ... This results in a host not found error. However, when I hardcode the smtphost like:
<dtml-sendmail smtphost="192.168.0.20">
This works. It take the attribute value (without evaluation) as host name.
If you really need, you may extend "sendmail": The usual proceedure would be to provide an additional attribute "smtphost_expr" that behaves exactly like "smtphost" but expects a Python expression as attribute value, evaluates it and the uses it as "smtphost" would do, if it got this attribute. The attributes of "dtml-mime" have been extended along this line. You may look at them on how to implement it. Dieter
participants (1)
-
Dieter Maurer