嗨我在heroku和github上有我的rails应用程序,我目前正在我的应用程序中使用邮件程序:
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:user_name => "myemail@gmail.com",
:password => "PasswordShouldGoHere",
:authentication => "plain",
:enable_starttls_auto => true
}
Run Code Online (Sandbox Code Playgroud)
我不希望我的电子邮件和密码在我的github帐户上可见,因为人们只能登录并窃取我的信息.但是,如果我输入了一个假密码,那么当邮件发送时,我的应用程序会在heroku上给我一个错误.我知道我可以先将真实的电子邮件和密码推送到heroku然后编辑它并将假密码放在我的github帐户上,但是有更好的方法吗?