据此:在 Rails 2.3.14 中创建邮件非常简单:http ://railsapi.com/doc/v2.3.2/
但是..它对我不起作用
我做了
bundle exec script/generate development_mailer
并添加了一个方法:
def send_data(data)
Time.zone = 'Eastern Time (US & Canada)'
subject "An error has occurred"
recipients "bugs@myapp.com"
from AppConfig['from_email']
sent_on sent_at
body["email"] = data
end
但是当它尝试运行时,我收到此错误:
NoMethodError (undefined method `send_data' for DevelopmentMailer):
那是怎么回事?