J'utilise Rails 3.2.5 et gem exception_notification. En mode production, j'envoie généralement des courriels à l'aide de la gemme postmark-rails de PostMarkApp.exception_notification: smtp ne fonctionne pas
Dans un premier temps, je suis une erreur Voir de gemme exception_notification indiquant
ActionView::Template::Error (code converter not found (UTF-8 to UTF-16))
donc basée sur exception_notification gem raises ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)) only on Heroku production mode, je me suis déplacé à
gem 'exception_notification', git: 'git://github.com/alanjds/exception_notification.git'
Ceci a résolu ce bug. Maintenant, je veux que la gemme envoie des courriels de mon compte gmail au lieu d'utiliser des crédits PostMarkApp, donc j'ai ajouté ce qui suit à mon production.rb, mais la notification d'exception tente d'envoyer des e-mails uniquement depuis Post Mark App. Pourquoi ce paramètre ne fonctionne-t-il pas?
config.middleware.use ExceptionNotifier,
sender_address: '[email protected]',
exception_recipients: '[email protected]',
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 => "[email protected]",
: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 => "_____" }