[Zope] Troubleshooting Maildrop Host

Chris Withers chris at simplistix.co.uk
Fri Nov 10 03:41:58 EST 2006


Nancy Donnelly wrote:
> try:
>     mailhost=getattr(context, context.superValues('Mail Host')[0].id)

'Mail Host' won't find a Maildrop Host...

> except:

Bare excepts like this are extremely bad programming practice...

>     raise AttributeError, "Can't find a Mail Host object"

Why not just let the original exception get raised?!

> Yet, when I go to fire up the script, the email is not sent. What am I doing wrong here?

Quite a lot, I'm afraid...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope mailing list