search for: newslettermailer

Displaying 2 results from an estimated 2 matches for "newslettermailer".

2008 Oct 22
1
Sending thousands of email with ar_mailer
Hi, to send an email with ar_mailer I need to generate it and save it to the db, right? Currently the code looks very simple: Newsletter.recepients.each do |recepient| NewsletterMailer.deliver_dedicated(request, recepient, newsletter) end But for i.e. 30000 receivers it''s going to take a long while anyway. Should I create them somehow in the background using BackgrounDRb or something similar? If I should, then I could get rid of the ar_mailer and just send all emails in...
2011 Jan 06
1
Send email with delayed job
Hi, I want to send email with delayed job. In order to do so, I have a Notifier model with X methods sending different type of emails. In the documentation, they suggest to send email like this: class NewsletterJob < Struct.new(:text, :emails) def perform emails.each { |e| NewsletterMailer.deliver_text_to_email(text, e) } end end But in my notifier model I have X methods, does it mean I have to create a different Struc for each methods? Greg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby o...