Hi, Does anyone know a way to allow the modification of the subjects from the mail template. So at the top of the template I want to using something like the following: <%= @subject = ''Testing 1,2,3...'' %> Which really sets the subject of the e-mail. Regards, Peter
On Sep 18, 2005, at 12:42 PM, Peter C. Verhage wrote:> Hi, > > Does anyone know a way to allow the modification of the subjects > from the mail template. So at the top of the template I want to > using something like the following: > > <%= @subject = ''Testing 1,2,3...'' %> > > Which really sets the subject of the e-mail.This is not currently possible with ActionMailer. However, it seems a reasonable request, so if someone were to create a patch for it there is a fairly good chance it would find its way into rails. - Jamis
Jamis Buck wrote:> This is not currently possible with ActionMailer. However, it seems a > reasonable request, so if someone were to create a patch for it there > is a fairly good chance it would find its way into rails.I''ve found another possibility. In my mailer method I put the mailer object in the body hash like this: @body[''mailer''] = self Now I can simply refer to the mailer in the template using @mailer. So I can read the subject, change the subject, list the recipients etc. It might be a good idea to put the mailer in the body by default? Regards, Peter