Has anybody ever had any success sending the output of an action as the body for html email using Action Mailer? http://railsapp.com/controller/list/1 I would like to send "what was just added" in the body ...
On 10/05/2005, at 1:30 PM, Ron Sweeney wrote:> Has anybody ever had any success sending the output of an action as > the body for html email using Action Mailer? > http://railsapp.com/controller/list/1 > > I would like to send "what was just added" in the body ...in your ActionMailer template, you could call: <%= render("page/i/want") %> or try breaking the what was just added part into a partial, and using render_partial... is that kind of what you wanted? I had to work the other way (show a preview of an email that will be sent) and thats the approach i followed... might not be the best, but it worked for me Bodhi
Ron, I''ve done this by using the render_to_string method and passing it''s result in as the body of the e-mail. -- DeLynn Berry delynnb-+9FQAZFMD0vCste6SmUHRhL4W9x8LtSr@public.gmane.org> -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ron Sweeney > Sent: Monday, May 09, 2005 10:31 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails] output of page as body to html email > > > Has anybody ever had any success sending the output of an > action as the body for html email using Action Mailer? > http://railsapp.com/controller/list/1 > > I would like to send "what was just added" in the body ... > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/> rails >