Problem with dtml-sendmail
we wrote an email form that performs a POST on a python script. This python script calls a dtml-method with the <dtml-sendmail>. The dtml-sendmail does not find the MailHost if it is not in the same folder. So I have to create a separate MailHost in the same folder and everything is fine. Acquisition otherwise works fine, the standard_html_header is found and included. So why does Acuqisition not work for dtml-sendmail? Any ideas? Markus
Markus Stoll writes:
we wrote an email form that performs a POST on a python script. This python script calls a dtml-method with the <dtml-sendmail>.
The dtml-sendmail does not find the MailHost if it is not in the same folder. So I have to create a separate MailHost in the same folder and everything is fine. Acquisition otherwise works fine, the standard_html_header is found and included.
So why does Acuqisition not work for dtml-sendmail? It does!
Why do you make a standard error? DTML objects want to be called with two positional arguments. Please read "Calling DTML objects" in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
So why does Acuqisition not work for dtml-sendmail? It does! Why do you make a standard error? DTML objects want to be called with two positional arguments. Please read "Calling DTML objects" in
thanks for your input, but thats what I tried. in the python script I call the DTML method as follows: from python script "send": return container.sendReal(context, context.REQUEST, sender=sender, rlist=rlist, [... further arguments]) in the DTML Method "sendReal": <dtml-var standard_html_header> is found and included but <dtml-sendmail mailhost="MailHost"> generates a "Error Type: KeyError", "Error Value: MailHost" though MailHost and standard_html_header are located in the very same folder. Im am still puzzled. Markus
From: "Markus Stoll" <markus.stoll@junidas.de>
we wrote an email form that performs a POST on a python script. This python script calls a dtml-method with the <dtml-sendmail>.
Isn't it easier to call the send method on the mailhost directly from Python?
participants (3)
-
Dieter Maurer -
Lennart Regebro -
Markus Stoll