Brian Hutchison
2005-Nov-07 21:01 UTC
Using Layouts with ActionMailer when sending html formatted emails
Hello all, I''ve been spinning my wheels on a problem here, hope someone can help me out. I''m pretty new to Ruby & Rails. I''ve added some email capabilities to Typo. Its all finally working for the most part, however I don''t know how to get the layout specified. I am calling the Mailer class method to send the email from within the articles controller (for those familiar with typo). I know about setting the layout in the Render command from reading the Rails book, but where would I do so here? I fire off the Mailer::deliver_email_updates() command and it ''renders'' the email based upon the email_updates method in my Mailer Class (Mailer < ActionMailer::Base). I''ve even tried setting the layout in the hash that I send to the body, and tried various naming conventions to see if it will get automatically picked up, to now avail. Right now, my email template & partial tempates are scattered with <font> commends, where are ugly and I''d like to move them up into the <head> of a layout. Thanks in advance for any assistance. Thanks, Brian Hutchison _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails