Prioritizing Mailer Queue / Action Mailer

Hi,

I have different kinds of mails going out. For eg:

  1. signup
  2. notification mails
    etc

I am using mailer queue to avoid mongrels waiting on email to be sent.
However, it makes sense to have signup mails go instantaneously whereas
other mails can go to mailer queue.

Has anyone done such thing? Any suggestions please?

Regards,
SG

Use the spawn plugin.

On Sep 9, 3:29 pm, Sandeep G. <rails-mailing-l…@andreas-

Hi Mukund,

I dint look at spawning a thread, coz there we might be limited by
number of threads that can be spawned at a time, which is system
specific. Mails can easily hit that big a number.

I am happy with Mailer Queue plugin which queues all the mails and then
in trigger cron job to periodically send those non-urgent mails.

But signup mails are time critical, so i was asking for suggestions to
bypass MailerQueue to deliver these mails.

Regards,
SG

Mukund wrote:

Use the spawn plugin.

On Sep 9, 3:29�pm, Sandeep G. <rails-mailing-l…@andreas-

I’ve enjoyed using ar_mailer and it’s ar_sendmail daemon. You can set
it to process your email queue every 30 seconds, or 60 seconds and
avoid having the issue of a cron job load your application. You do
need to monitor that the daemon remains running! (god, monit, .etc)

Is 30 or 60 seconds too long to wait?

Good Luck,
Jim Cifarelli

I actually use Mail Queue, it provides an option to bypass Queue.So on
Signup mails, i add “!” (exclamation) at the end.

Check if ar_mailer provides a similar option.

Xdmx X. wrote:

JimCifarelli wrote:

I’ve enjoyed using ar_mailer and it’s ar_sendmail daemon. You can set
it to process your email queue every 30 seconds, or 60 seconds and
avoid having the issue of a cron job load your application. You do
need to monitor that the daemon remains running! (god, monit, .etc)

Is 30 or 60 seconds too long to wait?

how many emails are you able to handle with ar_mailer? i’ve to send at
least 5000-10000 emails, but i don’t know what to use, is ar_mailer,
mailer queue or something else. ar_mailer is very nice because of its
daemon, but it miss the priority or the possibility to send emails
without queue them. This is quite important when you have a lot of
emails in queue (like 10000), you can send every 30-60 seconds, but if
you send 10000 emails, and a user signup on the site, it will get the
welcome/activation email after the 10000 emails are been sent… that’s
not very good :slight_smile: (e.g. 50 emails every minute would mean 200 minutes, so
more than 3 hours for the user to get its welcome/activation email)
My fear is also that do an insert of so many emails wouldn’t be good
too… :frowning:
Any suggestion?

thanks

JimCifarelli wrote:

I’ve enjoyed using ar_mailer and it’s ar_sendmail daemon. You can set
it to process your email queue every 30 seconds, or 60 seconds and
avoid having the issue of a cron job load your application. You do
need to monitor that the daemon remains running! (god, monit, .etc)

Is 30 or 60 seconds too long to wait?

how many emails are you able to handle with ar_mailer? i’ve to send at
least 5000-10000 emails, but i don’t know what to use, is ar_mailer,
mailer queue or something else. ar_mailer is very nice because of its
daemon, but it miss the priority or the possibility to send emails
without queue them. This is quite important when you have a lot of
emails in queue (like 10000), you can send every 30-60 seconds, but if
you send 10000 emails, and a user signup on the site, it will get the
welcome/activation email after the 10000 emails are been sent… that’s
not very good :slight_smile: (e.g. 50 emails every minute would mean 200 minutes, so
more than 3 hours for the user to get its welcome/activation email)
My fear is also that do an insert of so many emails wouldn’t be good
too… :frowning:
Any suggestion?

thanks

Hi Jim,

I tried using ar_mailer as per your suggestion, but facing issues. Can
you please have a look at this and help me out:

http://www.ruby-forum.com/topic/167170#733845

Basically, emails are not getting stored into the DB.

Sandeep G