[Zope] Problem with dtml-sendmail from external method

Kent Polk kent@goathill.org
24 Jul 2000 18:17:44 GMT


I have two DTML Methods:
---------------------------------
<dtml-sendmail smtphost="xxx">
To: <dtml-var tolist>
From: xxx
Subject: <dtml-var subject>

<dtml-var body>
</dtml-sendmail>
---------------------------------
To: <dtml-var tolist>
From: xxx
Subject: <dtml-var subject>

<dtml-var body>
</dtml-sendmail>
---------------------------------
(fill in the 'xxx's)

When I call either from a form or via xml-rpc they work properly.
However, when I call the one with the dtml-sendmail tags from an
external method, it triggers an exception (the second version does
not trigger an exception).

For instance:
self.test(tolist=towhom, subject=subject, body=message)

> Fault: 
> Fault -2: 'Unexpected Zope error value:
> Error Type: AttributeError
> Error Value: this

Evidently the dtml-sendmail tag is looking for this(), probably in
globals, which is provided by the xml-rpc or dtml->dtml calls?
What is the recommended way of providing this information?

Thanks