Last active
December 28, 2015 23:39
-
-
Save kaeff/7580136 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RentARoleModel | |
class Application < Rails::Application | |
config.action_mailer.default_options = { from: "[email protected]" } | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config:add SMTP_ADDRESS=smtp.gmail.com [email protected] SMTP_PASSWORD=asdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment