[Zope3-dev] [WAS: Installing Zope3 and Zwiki] MailHost

Janko Hauser jh@comunit.de
Tue, 22 Apr 2003 17:37:40 +0200


On Tue, 22 Apr 2003 13:23:20 +0200 (CEST)
PieterB <pieterb@gewis.nl> wrote:


> On remark about Zwiki and mailing. I was surprised that the
> notification worked out of the box, i didn't need to specify a
> MailHost. In wikipage.py
> 
>         server = smtplib.SMTP(self.host, self.port)
>         server.set_debuglevel(0)
>         server.sendmail('wiki@zope3.org', emails, msg)
>         server.quit()
> 
> I think Zope 3 should also use a component for (asynchronous)
> sending e-mail, rather than letting each application use smtplib.
> The component can then be configured to use a mailhost, and to use
> an appropriate domainname.

AFAIK this is already implemented as a service. Have a look into 

Zope3/src/zope/app/mail

With regards to blocking mails. Python2.3 has the ability to set
timeouts for the sockets. This is a better measure against blocking
mail sending. IMO mails should never take long to leave the platform.
Everthing else is a failure and should be handled specifically.
We have this already implemented once for Zope2, but with the help of
timeoutsocket-module. Which would also be needed here for Python.2.2
Is asynchronous sending really necessary?

Another thing I think is useful is some kind of logging of send and/or
failed messages to the filesystem. Sometimes the customer has high
interest in the platform generated mails and it's a lot of a hassle to
configure it in the MTA like sendmail or postfix.


__Janko