Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved smtp config to separate .yml file
- Loading branch information
1 parent
74c4b63
commit 1218d80
Showing
4 changed files
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Loading email config from #{Rails.root}/config/smtp.yml file, for | ||
# a given rails environment. | ||
# | ||
# Note that by default yaml hash keys are strings and | ||
# ActionMailer::Base.smtp_settings requires symbols; we're using | ||
# the symbolize_keys (a.k.a. to_options) method from core rails | ||
# extensions | ||
# | ||
# | ||
# Sample file for a Gmail smtp with custom domain (custom-domain.com) | ||
# | ||
# development: | ||
# address: smtp.gmail.com | ||
# port: 587 | ||
# domain: custom-domain.com | ||
# user_name: companyhandbook@custom-domain.com | ||
# password: INSERT_PASSWORD_HERE | ||
# authentication: plain | ||
# enable_starttls_auto: true | ||
# | ||
# production: | ||
# address: smtp.gmail.com | ||
# port: 587 | ||
# domain: custom-domain.com | ||
# user_name: companyhandbook@custom-domain.com | ||
# password: INSERT_PASSWORD_HERE | ||
# authentication: plain | ||
# enable_starttls_auto: true | ||
|
||
# ActionMailer::Base.smtp_settings = YAML.load_file("#{Rails.root}/config/smtp.yml")[Rails.env] | ||
|
||
CorporateHandbook::Application.configure do | ||
config.action_mailer.smtp_settings = YAML.load_file("#{Rails.root}/config/smtp.yml")[Rails.env].symbolize_keys | ||
end |