songtianlun
eefe9984ac
- Change default from email to use ENV variable - Fetch SMTP username from Rails credentials This change improves the security of the application by avoiding hardcoded email addresses and allows for easier configuration across different environments.
5 lines
170 B
Ruby
5 lines
170 B
Ruby
class ApplicationMailer < ActionMailer::Base
|
|
default from: ENV.fetch("RAILS_SMTP_USERNAME", Rails.application.credentials.dig(:smtp, :user_name))
|
|
layout "mailer"
|
|
end
|