Reputation: 67
I am trying to make an exception notifier. I installed the gem and put this code in production.rb:
config.action_mailer.delivery_method = :sendmail
# Defaults to:
config.action_mailer.sendmail_settings = {
:location => '/usr/sbin/sendmail',
:arguments => '-i -t'
}
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.middleware.use ExceptionNotifier,
:email_prefix => "Error 500",
:sender_address => %{"Notifier" <[email protected]>},
:exception_recipients => %w{[email protected]}
This doesn't throw any error, but it does not send the mail either. Help please.
Upvotes: 1
Views: 1324
Reputation: 67
I've replaced:
config.action_mailer.delivery_method = :sendmail
# Defaults to:
config.action_mailer.sendmail_settings = {
:location => '/usr/sbin/sendmail',
:arguments => '-i -t'
}
With:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "google.com",
:user_name => "[email protected]",
:password => "password",
:authentication => "plain",
:enable_starttls_auto => true }
And it worked fine :D !
Upvotes: 1