diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/user_mailer.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index a7efa73c1..4104f6cd2 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -54,4 +54,15 @@ class UserMailer < Devise::Mailer mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject') end end + + def welcome(user) + @resource = user + @instance = Rails.configuration.x.local_domain + + return if @resource.disabled? + + I18n.with_locale(@resource.locale || I18n.default_locale) do + mail to: @resource.email, subject: I18n.t('user_mailer.welcome.subject') + end + end end |