|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PhillyOnRails] Action Mailer Template
|
Hi,
I understand :-) The body is a hash and you set it up
for the template file, eg:
@body['company']=company
And then call it <%= company %>
Sorry for the extraneous email in your inbox.
Thanks,
Jason
--- Jason Lenhart <jplenhart@yahoo.com> wrote:
> Hi,
>
> 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
> example:
>
> <%= @from %>
> Comes up blank. Obviously I have this wrong - how
> do
> I make my template dynamic. Thanks in advance.
>
> Jason
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> _______________________________________________
> talk mailing list
> talk@phillyonrails.org
> http://lists.phillyonrails.org/mailman/listinfo/talk
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
talk mailing list
talk@phillyonrails.org
http://lists.phillyonrails.org/mailman/listinfo/talk
|
|