Reputation: 229
I am trying to set up a mailer with my heroku application. I fear if I push up my production.rb, my gmail password will be exposed. How can I prevent this?
Production.rb:
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :plain,
:user_name => "[email protected]",
:password => "**********"
}
Upvotes: 0
Views: 98
Reputation: 3241
You can use environment variables: https://devcenter.heroku.com/articles/config-vars
It's a best-practice to never include sensitive information in your repo. Env variables are also a good way to go, because they'll work with whatever provider you use, so if you move from Heroku to another platform, you won't need to make any changes to your code.
Upvotes: 2