Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 !

like image 281
AaShish Upadhyay Avatar asked Apr 12 '12 14:04

AaShish Upadhyay


1 Answers

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:

  • MailGun
  • SendGrid
  • PostmarkApp
  • MailChimp
  • Mailjet
  • PostageApp

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

like image 182
tadman Avatar answered Oct 01 '22 15:10

tadman