[Zope] Calling a DTML Method from within an ExternalMethod
   
    Holger Hoffmann
     
    hohoff@rz.uni-potsdam.de
       
    Sat, 24 Nov 2001 11:10:01 +0100
    
    
  
Hi,
Bruce Eckel wrote:
> 
> Maybe there's a better way to do this.
> 
> How about this: can I use the Zope "MailHost" object from within an
> external method to send mail?
yes, the interface is described in the API Reference of
the Zope Book:
  http://www.zope.org/Members/michel/ZB/AppendixB.dtml
Use it like:
subject = "E-Mail Subject"
mto = "zope@zope.org"
mfrom = "hohoff@rz.uni-potsdam.de"
message = """To: zope@zope.org
This is my E-Mail."""
self.NameOfMailHostObject.send(message, mto, mfrom, subject)
... Holger