Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Update app configuration SMTP settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ktamaral authored and pobocks committed Dec 10, 2020
1 parent 262cd14 commit 82aeed0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
7 changes: 5 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@
address: ENV['SMTP_ADDRESS'],
port: ENV['SMTP_PORT'],
domain: ENV['SMTP_DOMAIN'],
username: ENV['SMTP_USERNAME']||'',
password: ENV['SMTP_PASSWORD']||'',
authentication: ENV['SMTP_AUTHENTICATION']||:plain,
enable_starttls_auto: ENV['SMTP_TLS']||false
}

if ENV["SMTP_USERNAME"].present? && ENV["SMTP_PASSWORD"].present?
config.action_mailer.smtp_settings.username = ENV['SMTP_USERNAME']
config.action_mailer.smtp_settings.password = ENV['SMTP_PASSWORD']
end

MAIL_RECIPIENT_OVERRIDE = (ENV['OVERRIDE_RECIPIENTS']||[]).split(",")
config.action_mailer.perform_caching = false

Expand Down
7 changes: 5 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@
address: ENV['SMTP_ADDRESS'],
port: ENV['SMTP_PORT'],
domain: ENV['SMTP_DOMAIN'],
username: ENV['SMTP_USERNAME']||'',
password: ENV['SMTP_PASSWORD']||'',
authentication: ENV['SMTP_AUTHENTICATION']||:plain,
enable_starttls_auto: ENV['SMTP_TLS']||false
}

if ENV["SMTP_USERNAME"].present? && ENV["SMTP_PASSWORD"].present?
config.action_mailer.smtp_settings.username = ENV['SMTP_USERNAME']
config.action_mailer.smtp_settings.password = ENV['SMTP_PASSWORD']
end

MAIL_RECIPIENT_OVERRIDE = (ENV['OVERRIDE_RECIPIENTS']||[]).split(",")
config.action_mailer.perform_caching = false

Expand Down
7 changes: 5 additions & 2 deletions config/environments/qa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@
address: ENV['SMTP_ADDRESS'],
port: ENV['SMTP_PORT'],
domain: ENV['SMTP_DOMAIN'],
username: ENV['SMTP_USERNAME']||'',
password: ENV['SMTP_PASSWORD']||'',
authentication: ENV['SMTP_AUTHENTICATION']||:plain,
enable_starttls_auto: ENV['SMTP_TLS']||false
}

if ENV["SMTP_USERNAME"].present? && ENV["SMTP_PASSWORD"].present?
config.action_mailer.smtp_settings.username = ENV['SMTP_USERNAME']
config.action_mailer.smtp_settings.password = ENV['SMTP_PASSWORD']
end

MAIL_RECIPIENT_OVERRIDE = (ENV['OVERRIDE_RECIPIENTS']||[]).split(",")
config.action_mailer.perform_caching = false

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
crt-app:
image: registry.lts.harvard.edu/lts/crt-app:1.4.4
image: registry.lts.harvard.edu/lts/crt-app:1.4.5
build:
context: ./
dockerfile: DockerfilePub
3 changes: 2 additions & 1 deletion env-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ SMTP_ADDRESS=smtp.example.com
SMTP_PORT=25
SMTP_DOMAIN=example.com
# Email notifications optional settings
SMTP_AUTH=plain
SMTP_AUTHENTICATION=plain
SMTP_TLS=false
SMTP_USERNAME=example
SMTP_PASSWORD=password

0 comments on commit 82aeed0

Please sign in to comment.