Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 22nd, 2012  |  syntax: None  |  size: 0.83 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Heroku actionmailer how to
  2. module Konkurranceportalen
  3.   class Application < Rails::Application
  4.     # Settings in config/environments/* take precedence over those specified here.
  5.     # Application configuration should go into files in config/initializers
  6.     #  all .rb files in that directory are automatically loaded.
  7.     config.action_mailer.delivery_method = :smtp
  8.     ActionMailer::Base.smtp_settings = {
  9.   :address  => "smtp.mydomain.com",
  10.   :port  => 25,
  11.   :user_name  => "mail@mydomain.com",
  12.   :password  => "mypass",
  13.   :authentication  => :login
  14. }
  15. end
  16. end
  17.        
  18. ActionMailer::Base.smtp_settings = {
  19.   :address        => "smtp.sendgrid.net",
  20.   :port           => "25",
  21.   :authentication => :plain,
  22.   :user_name      => ENV['SENDGRID_USERNAME'],
  23.   :password       => ENV['SENDGRID_PASSWORD'],
  24.   :domain         => ENV['SENDGRID_DOMAIN']