One way to start an asynchronous job in Zope is with the Xron product.
Instead of sending the email, you create a Xron scheduled method to perform
that task. If you specify a trigger time of "now" (or any time in the past),
the scheduled method will execute (almost) immediately in a separate Zope
thread. Or you could specify a later time for all emails, thereby
effectively batching them. You can store as much context as you need in the
acquisition path or properties of the scheduled method. Anything written to
STDOUT by the scheduled method will be stored in the log file, so you can
easily log any problems with sendmail.
----- Original Message -----
From: "Richard Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: September 04, 2000 08:11 AM
Subject: Re: [Zope] Non-blocking MailHost
> I think what people have in mind (correct me if I am wrong) is
> something that will accept messages (for posting to the mailhost at
> some time in the future) and then immediately return. I guess it would
> another process/thread to do the posting asynchronously.
> The problem, as I see it is how to handle an error with the
> posting. The user who submitted the mail is now long gone so it must
> be left to an administrator to pick up the pieces.
> Perhaps the posting routine could accept a user (developer) provided
> exception handler that gets called if a posting fails.
> It maybe better to just hand this off to a completely separate program
> rather than try to handle it within a zope thread.
> [EMAIL PROTECTED] writes:
> > Chris,
> > Out of curiosity, what exactly is a non-blocking MailHost?
> > On Mon, Sep 04, 2000 at 09:31:15AM +0100, Chris Withers wrote:
> > >
> > > What we really want is a non-blocking MailHost.
> > >
> > > Anyone know how or want to write one?
> Zope maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -