[Zope] Re: Sendmail, Python and ZPT

Andreas Tille tillea@rki.de
Mon, 4 Nov 2002 10:24:43 +0100 (CET)


On Mon, 4 Nov 2002, beno wrote:

> It threw an error. Here's the script:
>
> try:
>      mailhost=getattr(context, context.mailScript('MailHost')[0].id)
> except:
>      raise AttributeError, "cant find a Mail Host object"
>
> I changed the name of the script to mailScript() from superValues(). I
Uhmm, why did you changed that???

> didn't pass any parameters. The original script had *Mail Host* as opposed
> to *MailHost* but I tried both. What am I missing?
Just use "Mail Host" (with the space included).  I just tried to remove
the space according to the Id of my MailHost object but this failed but
worked well exactly as coppied from the above URL.

Further question:
Any example how to add an attachment (for instance PDF) to the mail?

Kind regards

         Andreas.