[z3-five] MailHosts as utilities

Chris Withers chris at simplistix.co.uk
Wed Jan 10 22:05:17 CET 2007


Philipp von Weitershausen wrote:
>>>   3) make persistent version of utility that can be registered locally
>>> and stores it's settings internally
>>
>> I'd like to see existing MailHost-ish things fulfill this roll.
> 
> Sure, though it'd be nice to have the same interface for both global 
> utilities that can be defined in Zope 3 and local ones. Then code 
> wanting to send emails wouldn't have to bother which one it wnats.

Isn't this what adapters are for?

It'd be unpleasantly surprised if an adapter from Zope 3's mailer 
interface to IMailHost isn't quite easy to right.

Sadly, I'm guessing if you try to get a utility that implements 
IMailHost, it won't pick up global zope3 mailers, even though there is 
an adapter for them...

cheers,

Chris

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



More information about the z3-five mailing list