forked from next-l/enju_leaf
-
Notifications
You must be signed in to change notification settings - Fork 5
exception_notification
nabeta edited this page Sep 30, 2011
·
2 revisions
エラー・例外通知の設定方法です。
- config/application.rb
以下の4行のコメントを外し、メールアドレスを書き換えます。
#config.middleware.use '::ExceptionNotifier', # :email_prefix => "[EnjuLeaf] ", # :sender_address => %{"notifier" }, # :exception_recipients => %w{[email protected]}`
- config/environments/production.rb
以下の10行のコメントを外し、SMTPサーバやユーザ名・パスワード(認証が必要な場合)を指定します。
#config.action_mailer.delivery_method = :smtp #config.action_mailer.smtp_settings = { # :address => "smtp.example.jp", # :port => 587, # :domain => 'library.example.jp', # :user_name => '', # :password => '', # :authentication => 'plain', # :enable_starttls_auto => true #}
config.middleware.use '::ExceptionNotifier', :email_prefix => "[EnjuLeaf] ", :sender_address => %{"notifier" }, :exception_recipients => %w{[email protected] [email protected]}
config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.example.jp", :port => 25, :domain => 'library.example.jp', :user_name => 'tanabe', :password => 'hogehoge', :authentication => 'plain', :enable_starttls_auto => true }