How de we send out 5000 emails per hour using actionmailer in ruby on rails?

AaShish Upadhyay picture AaShish Upadhyay · Apr 12, 2012 · Viewed 9.2k times · Source

I have some questions about ActionMailer :

  1. How does Actionmailer connect to a smtp server ?

  2. Are the connections concurrent or parallel if the number of emails high > 1000 ?

  3. How will sending out emails like facebook does ( 1000's in numbers ) as immediate emails affect the ruby on rails application and how would actionmailer handle it ?

  4. Any other solution/plugin to send out large number emails from a RoR application apart ActionMailer?

------------------------------------------------added :

We need to send out at least 1000 emails per 15 minutes . We are using a Notes Domino server as our smtp server .! what is the possible architecture for this kind of problem. We are already storing the emails in the database to send them later , but what is needed is the sending approach !

Answer

tadman picture tadman · Apr 12, 2012

The usual thing is to create a background job to send email. ActionMailer is very good for single emails but does tend to run into trouble after sending multiple emails as each one can take several seconds to complete. That's why I created PostageApp to help solve those problems.

Some services on the market to help you with sending lots of email from Rails:

All of these have ways of sending multiple messages with a single API call or SMTP transaction.