Skip to content

Commit

Permalink
configuring gmail smtp and exception notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminleesmith committed Mar 25, 2011
1 parent bf2206e commit edf697e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,18 @@ class Application < Rails::Application

# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]

config.action_mailer.delivery_method = :smtp

config.action_mailer.raise_delivery_errors = true

ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:authentication => 'plain',
:user_name => ENV['GMAIL_SMTP_USER'],
:password => ENV['GMAIL_SMTP_PASSWORD'],
:enable_starttls_auto => true,
:tls => true
}
end
end
5 changes: 5 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@

# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin

config.middleware.use "::ExceptionNotifier" , :email_prefix => "[RCS.com Exception] ",
:sender_address => %{"notifier" <benjamin.lee.smith@gmail.com>},
:exception_recipients => %w{benjamin.lee.smith@gmail.com}
end


1 change: 1 addition & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@
config.middleware.use "::ExceptionNotifier" , :email_prefix => "[RCS.com Exception] ",
:sender_address => %{"notifier" <benjamin.lee.smith@gmail.com>},
:exception_recipients => %w{benjamin.lee.smith@gmail.com}

end

0 comments on commit edf697e

Please sign in to comment.