Working on OS X, trying to get Rails Exception Notifier plugin to send out emails. I have verified the following:
- I can successfully send email from my app
- I am creating a test error (
1/0
in one of my actions). Current plugin installed...
script/plugin install git://github.com/rails/exception_notification.git
In ApplicationController...
include ExceptionNotifiable
local_addresses.clear
In environment.rb...
Rails::Initializer.run do |config| # ... config.after_initialize do ExceptionNotifier.exception_recipients = %w([email protected] [email protected]) ExceptionNotifier.sender_address = %("Contact DB error" <[email protected]>) ExceptionNotifier.email_prefix = "[Contact DB error] " end end
In addition to the intentionally-created test error, I'm seeing this error on the console...
Processing ApplicationController#index (for 127.0.0.1 at 2009-10-02 14:40:55) [GET]
Net::SMTPFatalError (555 5.5.2 Syntax error. 3sm30577fge.12
):
/usr/local/lib/ruby/1.8/net/smtp.rb:680:in `check_response'
/usr/local/lib/ruby/1.8/net/smtp.rb:653:in `getok'
/usr/local/lib/ruby/1.8/net/smtp.rb:631:in `mailfrom'
/usr/local/lib/ruby/1.8/net/smtp.rb:544:in `send0'
/usr/local/lib/ruby/1.8/net/smtp.rb:472:in `sendmail'
/usr/local/lib/ruby/1.8/net/smtp.rb:379:in `start'
haml (2.2.6) rails/./lib/sass/plugin/rails.rb:19:in `process'
Then it tries to send an exception notification for the SMTP error...
Subject: [Contact DB error] application#index (Net::SMTPFatalError) "555 5.5.2 Syntax error. 3sm30577fge.12\n"