-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixes issue #344-mailer * fix rubocop * Fixes mailer settings to include environment variable. * Updates rexml version --------- Co-authored-by: Thomas Scherz <[email protected]>
- Loading branch information
Showing
5 changed files
with
23 additions
and
8 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
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 |
---|---|---|
|
@@ -65,12 +65,24 @@ | |
# config.active_job.queue_adapter = :resque | ||
# config.active_job.queue_name_prefix = "application_portfolio_#{Rails.env}" | ||
|
||
# Configure Secure Sendmail mailer | ||
config.action_mailer.raise_delivery_errors = true | ||
|
||
config.action_mailer.perform_caching = false | ||
config.action_mailer.default_options = { from: '[email protected]' } | ||
config.mailer_from = '[email protected]' | ||
config.action_mailer.delivery_method = :smtp | ||
# Store the base url from where request is received. | ||
config.action_mailer.default_url_options = { host: ENV['APP_PORTFOLIO_PRODUCTION_MAILER_URL'] } | ||
# updated for tls and sendmail | ||
config.action_mailer.smtp_settings = { | ||
enable_starttls_auto: true, | ||
# 'address' specifies the address of the server that will handle email sending. | ||
address: ENV['MAIL_SMTP_ADDRESS'], | ||
# 'port' specifies which port to use on the SMTP server. | ||
port: 25, | ||
# 'ca_file' is the path to the certificate authority file. | ||
# In our case, it's a self-signed certificate. This tells Rails to trust this specific certificate. | ||
ca_file: '/etc/ssl/certs/sendmail.pem' | ||
} | ||
|
||
# Ignore bad email addresses and do not raise email delivery errors. | ||
# Set this to true and configure the email server for immediate delivery to raise delivery errors. | ||
|
@@ -99,9 +111,6 @@ | |
# Do not dump schema after migrations. | ||
config.active_record.dump_schema_after_migration = false | ||
|
||
# Needed for mail to work in production | ||
config.action_mailer.smtp_settings = { enable_starttls_auto: false } | ||
|
||
# Change the Uglifier parsing engine | ||
config.assets.js_compressor = Uglifier.new(harmony: true) | ||
end |