Rails 3.2.5 と exception_notification gem を使用しています。本番モードでは、通常、PostMarkApp の postmark-rails gem を使用してメールを送信しています。
最初に、exception_notification gem から View エラーが発生しました。
ActionView::Template::Error (code converter not found (UTF-8 to UTF-16))
そのため、Exception_notification gem raises ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)) only on Heroku production modeに基づいて、私はに移動しました
gem 'exception_notification', git: 'git://github.com/alanjds/exception_notification.git'
これでそのバグは解決しました。ここで、PostMarkApp クレジットを使用する代わりに、gmail アカウントからメールを送信するように gem を設定したいので、production.rb に以下を追加しましたが、Exception Notification は Post Mark App からのみメールを送信しようとします。この設定が機能しないのはなぜですか?
config.middleware.use ExceptionNotifier,
sender_address: 'noreply@mydomain.com',
exception_recipients: 'myemail@mydomain.com',
sections: %w{current_user} + ExceptionNotifier::Notifier.default_sections,
ignore_crawlers: %w{Googlebot bingbot},
email_format: true,
normalize_subject: true,
smtp_settings: {
:address => "smtp.gmail.com",
:port => "587",
:domain => "www.gmail.com",
:user_name => "myemail@gmail.com",
:password => "mypassword",
:authentication => "plain",
:enable_starttls_auto => true,
:openssl_verify_mode => 'none'
}
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_key => "_____" }