Jason Lenhart on 7 Feb 2006 23:36:54 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] Action Mailer Template


I have my first RoR application ready to go - running
against mysql.  Looks great, but I am having a heck of
a time with this ActionMailer.

I have everything running great except the template is
not working the way I had hoped (if only everything
would the first time:)

I set some all information in a method that
'extends/inherits' from ActionMailer::Base - I set all
the following:

@subject    = subject
    #@body       = message
 @recipients = "jplenhart@gmail.com"
 @from       = email
 @sent_on    = Time.now
 @headers    = {}

I have the body commented out because the template is
never called with a body.  But I would like it to pick
up my template (template being the view that was
created when I created the mailer).  

I am trying to use the same tags I have been using in
rhtml files but they do not come through.  For

<%= @from %>
Comes up blank.  Obviously I have this wrong - how do
I make my template dynamic.  Thanks in advance.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
talk mailing list