Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 14:33:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 14:33:21 +0300
commit7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch)
tree5bdc2229f5198d516781f8d24eace62fc7e589e9 /app/mailers
parent185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff)
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/identity_verification.rb16
-rw-r--r--app/mailers/emails/releases.rb2
-rw-r--r--app/mailers/previews/notify_preview.rb2
3 files changed, 15 insertions, 5 deletions
diff --git a/app/mailers/emails/identity_verification.rb b/app/mailers/emails/identity_verification.rb
index e3089fdef9b..f3fe609e7d1 100644
--- a/app/mailers/emails/identity_verification.rb
+++ b/app/mailers/emails/identity_verification.rb
@@ -2,14 +2,22 @@
module Emails
module IdentityVerification
- def verification_instructions_email(user_id, token:, expires_in:)
+ def verification_instructions_email(email, token:)
@token = token
- @expires_in_minutes = expires_in
+ @expires_in_minutes = Users::EmailVerification::ValidateTokenService::TOKEN_VALID_FOR_MINUTES
@password_link = edit_profile_password_url
@two_fa_link = help_page_url('user/profile/account/two_factor_authentication')
- user = User.find(user_id)
- email_with_layout(to: user.email, subject: s_('IdentityVerification|Verify your identity'))
+ headers = {
+ to: email,
+ subject: s_('IdentityVerification|Verify your identity'),
+ 'X-Mailgun-Suppressions-Bypass' => 'true'
+ }
+
+ mail_with_locale(headers) do |format|
+ format.html { render layout: 'mailer' }
+ format.text
+ end
end
end
end
diff --git a/app/mailers/emails/releases.rb b/app/mailers/emails/releases.rb
index 8fe93f59662..468a8624319 100644
--- a/app/mailers/emails/releases.rb
+++ b/app/mailers/emails/releases.rb
@@ -11,6 +11,8 @@ module Emails
)
@recipient = User.find(user_id)
+ add_project_headers
+
mail_with_locale(
to: @recipient.notification_email_for(@project.group),
subject: subject(release_email_subject)
diff --git a/app/mailers/previews/notify_preview.rb b/app/mailers/previews/notify_preview.rb
index 206518e582b..7d7e01950c8 100644
--- a/app/mailers/previews/notify_preview.rb
+++ b/app/mailers/previews/notify_preview.rb
@@ -210,7 +210,7 @@ class NotifyPreview < ActionMailer::Preview
end
def verification_instructions_email
- Notify.verification_instructions_email(user.id, token: '123456', expires_in: 60).message
+ Notify.verification_instructions_email(user.email, token: '123456').message
end
def project_was_exported_email