top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Sending multiple emails using Rails

0 votes
323 views

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 Jul 6, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The major problem would be if you are a user and somehow when you signup or try to send 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.

answer Jul 6, 2013 by anonymous
Similar Questions
0 votes

I need to upload multiple image upload at a time in my application. I searched and got the carrierwave gem as a solution, but I find that only one image at a time.but i need to upload multiple images at a time using single the button uploadimage. How can I overcome this problem.

+3 votes

I want to send html emails. I have a field containing a full html doc structure and I would like to send that. Basically the user brings that and saves it to the db.

I have tried various methods, with and without mailer template, also with yield in the template, but I am not getting the user provided html out (render?)

So, in short how do I send html w/o a template, or can the template be empty?

0 votes

I am trying to send e-mails using rails 2.3.10 and ruby 1.8.7. I have googled a lot but the best result i got was a code that not sent the e-mail and not dropped any error. Some one knows or has an example of a working e-malier for this version of rails and ruby?

+1 vote

I have just started with rails. I am making a attendance web app. I want to insert student attendance into attendances table and unable to do it as the form just inserts only last entry of the form. Student table and Attendances table have associations (has_many,belongs_to).

Please let me know how the form should be and controller API should look like.

0 votes

I need to upload multiple images at a time. How can I upload let me know please.

...