[Zope] Sending Mail from Page Template

Michael Bernstein webmaven at lvcm.com
Tue Sep 23 18:22:50 EDT 2003


Paul Winkler wrote:
> On Tue, Sep 23, 2003 at 10:48:24PM +0200, Matthias Suencksen wrote:
> 
>>Hello!
>>What is the most elegant way to send an email
>>from a page template?
>>
>>My current solution is to call the send() method
>>of the MailHost object from an "External Method".
>>
>>Is there a more direct way?
> 
> Well, it works just as well from a Script (python) as
> from an external method.
> 
> But there is nothing like dtml-sendmail, if that's what
> you mean.

On that note, I find it easy to call a DTML method (which contains a 
dtml-sendmail tag) from a Script (Python).

DTML methods are generally more convenient for templating plain text 
formats such as email.

- Michael
http://www.michaelbernstein.com




More information about the Zope mailing list