From d799921c75e7bfb83504bb79dcc1c269c91d168c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 18 Jan 2018 19:17:25 +0100 Subject: Replace tutorial modal with welcome e-mail (#6273) * Remove onboarding modal * Welcome e-mail * Send welcome e-mail after confirmation * Remove obsolete translations --- app/mailers/user_mailer.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/mailers') 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 -- cgit