Merge pull request 'Update FROM address for email delivery' (#292) from update-from into main
All checks were successful
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / rubocop (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 2m53s
Run unit tests / build-static-assets (push) Successful in 10m20s
All checks were successful
Run unit tests / check-licenses (push) Has been skipped
Run unit tests / rubocop (push) Has been skipped
Run unit tests / copyright_notice (push) Has been skipped
Run unit tests / unit_tests (push) Successful in 2m53s
Run unit tests / build-static-assets (push) Successful in 10m20s
Reviewed-on: #292
This commit is contained in:
commit
4496deeef5
@ -3,6 +3,16 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: 'from@example.com'
|
class << self
|
||||||
|
private
|
||||||
|
|
||||||
|
def default_from
|
||||||
|
File.read('/run/secrets/smtp_user_name').strip
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
'development@example.com'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
default from: default_from
|
||||||
layout 'mailer'
|
layout 'mailer'
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user