我正在尝试制作一个异常通知器。我安装了 gem 并将这段代码放在 production.rb 中:
config.action_mailer.delivery_method = :sendmail
# Defaults to:
config.action_mailer.sendmail_settings = {
:location => '/usr/sbin/sendmail',
:arguments => '-i -t'
}
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.middleware.use ExceptionNotifier,
:email_prefix => "Error 500",
:sender_address => %{"Notifier" <support@example.com>},
:exception_recipients => %w{my@mail.com}
这不会引发任何错误,但它也不会发送邮件。请帮忙。