Skip to content

Instantly share code, notes, and snippets.

@kaeff
Last active December 28, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaeff/7580136 to your computer and use it in GitHub Desktop.
Save kaeff/7580136 to your computer and use it in GitHub Desktop.
module RentARoleModel
class Application < Rails::Application
config.action_mailer.default_options = { from: "rent-a-role-model@kaeff.net" }
end
end
def headers
{
:subject => "Rent a Role Model request",
:from => "#{name} <#{Rails.application.config.action_mailer.default_options[:from]}>",
:to => @user.email,
:reply_to => email
}
end
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => ENV['SMTP_ADDRESS'], # smtp.gmail.com
:port => 587,
:user_name => ENV['SMTP_USER'],
:password => ENV['SMTP_PASSWORD'],
:authentication => 'plain',
:enable_starttls_auto => true
}
heroku config:add SMTP_ADDRESS=smtp.gmail.com SMTP_USER=rent-a-role-model@gmail.com SMTP_PASSWORD=asdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment