I am trying to test the Exception Notifier locally (development). Here is my current setup:
development.rb
Myapp::Application.configure do
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => '0.0.0.0:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'gmail.com',
:user_name => 'username@gmail.com',
:password => 'password',
:authentication => 'plain',
:enable_starttls_auto => true
}
config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[Myapp Error] ",
:sender_address => %{"notifier" <no-reply@myapp.com>},
:exception_recipients => %w{myemail@gmail.com}
}
end
But when I "create" an error in the application - for example, if I set a non-existent identifier, for example
http://localhost:3000/users/12270/edit
I see only an error in the browser, but the email address is not sent (valid email credentials).
What am I missing?
What are you
source
share