today_ai_weather/app/mailers/application_mailer.rb
songtianlun 28191fd829 fix: update SMTP username fetching method
- 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.
2025-01-18 14:26:35 +08:00

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