Aryk Grosz
2007-May-14 21:00 UTC
ActionMailer not having to render message for each recipient
Hi, I was wondering if there was a way for actionmailer to not have to render a new email message and send it seperately for each user when everything stays the same except for one or two things. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jean-Christophe Michel
2007-May-14 22:43 UTC
Re: ActionMailer not having to render message for each recipient
Hi, Le 14 mai 07, à 23:00, Aryk Grosz a écrit :> I was wondering if there was a way for actionmailer to not have to > render a new email message and send it seperately for each user when > everything stays the same except for one or two things.Same purpose. I tried: tmail = Mailing.create_mailing( { :subject => @title, :body => @content_html} ) test_emails.each do |dest| tmail.to = dest Mailing.deliver(tmail) end Works, except that the first mail in test_emails never receives the mail :/ Jean-Christophe Michel -- symetrie.com Better Nested Set for rails: http://opensource.symetrie.com/trac/better_nested_set --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Aryk Grosz
2007-May-14 23:01 UTC
Re: ActionMailer not having to render message for each recip
Interesting, isn''t this the same as having an array for the recipients? What I am saying is what if the body of the email says like "Dear <name>, Hows it going?" but all you wanted to do is change the name between emails. How would we do that? Jean-Christophe Michel wrote:> Hi, > > Le 14 mai 07, � 23:00, Aryk Grosz a �crit : >> I was wondering if there was a way for actionmailer to not have to >> render a new email message and send it seperately for each user when >> everything stays the same except for one or two things. > > Same purpose. I tried: > > tmail = Mailing.create_mailing( { > :subject => @title, > :body => @content_html} ) > > test_emails.each do |dest| > tmail.to = dest > Mailing.deliver(tmail) > end > > Works, except that the first mail in test_emails never receives the > mail :/ > > > Jean-Christophe Michel > -- > symetrie.com > > Better Nested Set for rails: > http://opensource.symetrie.com/trac/better_nested_set-- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---