Forum: Ruby on Rails Mailer class error

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
432c0b788c36a4a584dc4f05117df6d7?d=identicon&s=25 BensPop (Guest)
on 2007-05-04 17:05
(Received via mailing list)
I created a helper method in a file called mailer_helper.rb that I
want to use in my mailer class. I included the helper using this
helper :mailer
even after including this I get this error:
undefined local variable or method `get_host' for #<Mailer:0x38aca0c>
any ideas?

class Mailer < ActionMailer::Base

  helper :mailer

  def contact_us(contact_us)
    @subject      = 'Nu+riSum contact request'
    @recipients   = ''
    @from         =
    @sent_on      =
    @layout       = :mailer
    @body =
      :fn => contact_us.first_name,
      :ln => contact_us.last_name,
      :em =>,
      :org => contact_us.organization,
      :ph =>,
      :msg => contact_us.comments,
      :host => get_host
This topic is locked and can not be replied to.