I’m getting an error when I’m tyring to use the actionmailer.
undefined method `deliver_signup_thanks’ for Notifier:Class
This is what I have in the controller.
def emailTest
Notifier::deliver_signup_thanks()
render_text “email test”
end
This is what I have in notifier model (notifier.rb)
class Notifier < ActiveRecord::Base
def signup_thanks()
# Email header info MUST be added here @recipients = “[email protected]” @from = “[email protected]” @subject = “Thank you”
# Email body substitutions go here
# @body[â??first_nameâ?] = user.first_name
# @body[â??last_nameâ?] = user.last_name
end
end
This is what I have in environment.rb
ActionMailer::Base.server_settings = {
:address => “smtp.postoffice.net”,
:port => 25,
:domain => “www.test.us”,
:user_name => ‘test’,
:password => ‘test’,
:authentication => :login
}
Can anyone see anything wrong here? Appreiciate the help. Thanks