songtianlun
28191fd829
- Change from hardcoded default email to using Rails credentials - Improves security by avoiding exposure of sensitive information This change ensures that the application fetches the SMTP username from encrypted credentials, thereby enhancing security and reducing risk of accidental exposure in the source code.
5 lines
162 B
Ruby
5 lines
162 B
Ruby
class ApplicationMailer < ActionMailer::Base
|
|
default from: ENV.fetch("RAILS_SMTP_USERNAME", Rails.application.credentials.smtp.user_name)
|
|
layout "mailer"
|
|
end
|