Skip to content

Commit

Permalink
SMTP server settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Feb 10, 2017
1 parent 84b014b commit d33c90a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app.json
Expand Up @@ -70,6 +70,21 @@
"required": true,
"value": "-1",
"description": "Proposals with votes below this threshold will be considered 'blocked' when calculating status."
},
"SMTP_SERVER": {
"required": true,
"value": "smtp.sendgrid.net",
"description": "The name of your SMTP server, for sending mail"
},
"SMTP_USERNAME": {
"required": true,
"value": "username",
"description": "The login username for your SMTP server, for sending mail"
},
"SMTP_PASSWORD": {
"required": true,
"value": "password",
"description": "The password for your SMTP server, for sending mail"
}
},
"formation": {
Expand Down
10 changes: 10 additions & 0 deletions config/environments/production.rb
Expand Up @@ -62,6 +62,16 @@
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ENV['SMTP_SERVER'],
port: 587,
domain: ENV['DOMAIN'],
user_name: ENV['SMTP_USERNAME'],
password: ENV['SMTP_PASSWORD'],
authentication: 'plain',
enable_starttls_auto: true }

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
Expand Down

0 comments on commit d33c90a

Please sign in to comment.