Module: Emails::IdentityVerification
Instance Method Summary
collapse
#validate_single_recipient_in_email, #validate_single_recipient_in_email!, #validate_single_recipient_in_opts!
Instance Method Details
#verification_instructions_email(email, token:) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/mailers/emails/identity_verification.rb', line 7
def verification_instructions_email(email, token:)
validate_single_recipient_in_email!(email)
@token = token
@expires_in_minutes = Users::EmailVerification::ValidateTokenService::TOKEN_VALID_FOR_MINUTES
@password_link = edit_user_settings_password_url
@two_fa_link = help_page_url('user/profile/account/two_factor_authentication.md')
= {
to: email,
subject: s_('IdentityVerification|Verify your identity'),
'X-Mailgun-Suppressions-Bypass' => 'true'
}
mail_with_locale() do |format|
format.html { render layout: 'mailer' }
format.text
end
end
|
#verification_instructions_sent_to_secondary_email(primary_email, secondary_email) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'app/mailers/emails/identity_verification.rb', line 27
def verification_instructions_sent_to_secondary_email(primary_email, secondary_email)
validate_single_recipient_in_email!(primary_email)
@password_link = help_page_url('user/profile/user_passwords.md', anchor: 'change-your-password')
@two_fa_link = help_page_url('user/profile/account/two_factor_authentication_troubleshooting.md')
@account_settings_link = profile_account_url
@user_secondary_email = secondary_email
= {
to: primary_email,
subject: s_('IdentityVerification|Verification code sent to your secondary email address'),
'X-Mailgun-Suppressions-Bypass' => 'true'
}
mail_with_locale() do |format|
format.html { render layout: 'mailer' }
format.text
end
end
|