Update FROM address for email delivery #292
@ -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