4

I'm using the action mailer to send mails from my Ruby application. I set the smtp settings in the application.rb

it works fine. But I have to send lots of mails. some times about 150Mails in a minute.

My question is, does the action mailer establish every time the mail() function is used a new connection?

The Problem is that my Mail-Provider changes the PW of the account because too many mails were send. Is there any way to send the mail from different accounts? My idea is to set up about 20 mail accounts and during the sending process it should iterate through those is something like. is that possible?

Thanks

Felix
  • 5,452
  • 12
  • 68
  • 163
  • Which service are you using? – Sharvy Ahmed Apr 09 '15 at 08:47
  • Mail service or what do you mean? – Felix Apr 09 '15 at 08:52
  • Yes, for sending emails? – Sharvy Ahmed Apr 09 '15 at 08:53
  • 1und1.de is the mail provider – Felix Apr 09 '15 at 09:01
  • Your mail provider is not supposed to change the PW if a large of emails are sent, it's unacceptable in the first place. At first you need to change the provider, switch to some other service. There are many good email delivery service providers like mailgun or sendgrid. And yes you can change the smtp settings dynamically, here is a SO thread which explains it - http://stackoverflow.com/questions/2662759/how-to-send-emails-with-multiple-dynamic-smtp-using-actionmailer-ruby-on-rails – Sharvy Ahmed Apr 09 '15 at 10:19

1 Answers1

0
mail(
    to: receiver_email_address, 
    subject: email_subject, 
    from: sender_email_address
)
vlungu
  • 26
  • 1
  • yeah thats clear, i'm using it this way, but the sender_email_address is another than in the application.rb in the application.rb are the smtp settings set – Felix Apr 09 '15 at 08:21