How to implement a mailing system with Rails that sends emails in the background

Posted by Tam on Stack Overflow See other posts from Stack Overflow or by Tam
Published on 2010-04-19T07:52:18Z Indexed on 2010/04/19 7:53 UTC
Read the original article Hit count: 239

I want to implement a reliable mailing system with Ruby on Rails that sends emails in the background as sending email sometimes takes like 10 seconds or more so I don't want the user to wait. Some ideas I thought of: 1- Write to a table in DB a have a background process that go over and send email (concern: potential many reads/writes to DB slows down my application) 2- Messaging Queue background process / Rake task (concern: if server crashes queued mails will be lost also might eat up a lot of memory if many emails)

I was wondering if you a know of a good solution that provides a balance between reliability and performance.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about email