Class: UserAccountMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- UserAccountMailer
- Defined in:
- app/mailers/user_account_mailer.rb
Instance Method Summary collapse
Instance Method Details
#welcome_email(user, password) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/mailers/user_account_mailer.rb', line 2 def welcome_email( user, password ) @user = user @password = password @mr_or_mrs = @user.female? ? t(:mrs) : t(:mr) # TODO: Somehow determine locale by email address or address or something else. locale = :de to = "#{@user.name} <#{@user.email}>" I18n.with_locale(locale) do mail to: to, subject: t(:welcome_to_the_new_intranet_platform) end end |