Saturday, July 6, 2013

Re: [Rails] Send multiple emails

The major problem would be if you are a user and somehow when you signup or try to sendo those emails through some action, the server could return a timeout response, if you have a lot of users. What I recommend you to do is, put all mailers call inside a worker like sidekiq or sucker_punch. it will help a lot with rake tasks in and other piece of code in background jobs.

hope I have helped you.

nice day


2013/7/6 Paul Bergstrom <lists@ruby-forum.com>
Any problems sending a lot of emails with rails like this:

@members = Members.all
@members.each do |m|
    MemberMailer.message(@message, m).deliver
end

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/766c4a5b29cab0bf62a784521c263ffb%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
thiagocifani

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAGNtUE_%3DvkOH_KVMUreYnzeaQLYCc7f9G9CsNRhJbHcOLPOkhA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate