I am trying to test the Exception Notifier out locally (development). Here's my current setup:
development.rb
Myapp::Application.configure do
# Set Mailer default url
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 = :file
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 up non-existing ID, like
http://localhost:3000/users/12270/edit
I see only error in the browser, but the email is not sent out (email credentials are correct).
What do I miss?
Than you