diff options
Diffstat (limited to 'app/mailers/emails/profile.rb')
-rw-r--r-- | app/mailers/emails/profile.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index f13ba9caee0..f967323f849 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -74,6 +74,30 @@ module Emails end end + def ssh_key_expired_email(user, fingerprints) + return unless user&.active? + + @user = user + @fingerprints = fingerprints + @target_url = profile_keys_url + + Gitlab::I18n.with_locale(@user.preferred_language) do + mail(to: @user.notification_email, subject: subject(_("Your SSH key has expired"))) + end + end + + def ssh_key_expiring_soon_email(user, fingerprints) + return unless user&.active? + + @user = user + @fingerprints = fingerprints + @target_url = profile_keys_url + + Gitlab::I18n.with_locale(@user.preferred_language) do + mail(to: @user.notification_email, subject: subject(_("Your SSH key is expiring soon."))) + end + end + def unknown_sign_in_email(user, ip, time) @user = user @ip = ip |