Feature request: Don't send email in realtime

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
eric.carlson
Posts: 12
Joined: 25 May 2005, 19:11

Feature request: Don't send email in realtime

Post by eric.carlson »

On servers with spamassassin, heavy loads or really busy mail servers the sending of emails from hosted apps can be very slow. Some java systems (e.g. jive forums) implement a separate spawned email queue, which the app writes the emails to and returns iimediately. The point of this is the background process then walks the email que, sending each one to the host for ttransmission, whilst the user gets an immediate return to whatever UI control they were on without having to wait for all the emails to be sent.

I apologise is this has been discussed before, but if not its hit us but just for the PHP apps, and I came in for some stick being in the middle of a PHP vs java war with my colleagues!!!
mcwizard
Posts: 14
Joined: 27 Jan 2006, 12:24

Post by mcwizard »

I might be wrong, but I think if you use linux's mail service to send the mails (phpMailer_method = 0), it behaves just correct. Only if you use SMTP (phpMailer_method = 2) for sending mails, you'll get the delay. But if you wanted to decouple that from the acting user, you'll need some mechanism which calls a cleanup-php-page every N minutes (maybe a cronjob), which'll raise the installation complexity...
djcarr
Posts: 10
Joined: 16 Sep 2005, 00:36

Post by djcarr »

Some host environments are threading-limited (so you don't take down the entire server), but if you're managing your own host it would be nice to have a configurable option in mantis to send emails in a separate thread.

Has this ever been done for PHP apps before or is it a fundamental limitation in PHP?

In my case I'm finding that where more than about 5 notification emails are needed (batch operations) mantis churns for a significant length of time and can even time out on occasion.
richm
Posts: 2
Joined: 09 Aug 2006, 10:48

Post by richm »

I'm really struggling with this too. I'm using mailer method 0. 1 didn't send any email and 2 sounds even worse. (Ubuntu Linux).

I could really do with a solution to this, it's the only thing holding our development department back from switching to mantis.
richm
Posts: 2
Joined: 09 Aug 2006, 10:48

Post by richm »

FWIW I think switching to the sendmail option (1) and using exim seems to have largely cured it.

Some accounts don't get email that way when they do if I use the php mailer (0) somewhat weirdly.
eric.carlson
Posts: 12
Joined: 25 May 2005, 19:11

Post by eric.carlson »

http://www.mantisbugtracker.com/bugs/changelog_page.php (mantisbt - 1.1.0a1) says it has "email queueing" but I couldn't find out more - is this what we are discussing here in this post? (Fingers crossed!!).
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

This feature is now available in Mantis 1.1.0a1 release. For details about this feature see wiki at:

http://wiki.mantisbugtracker.com/doku.p ... il_queuing

Regards,
Victor
Post Reply