Change format of verification email
This commit is contained in:
parent
26c26ed054
commit
f3eb73ee42
4 changed files with 8 additions and 11 deletions
|
@ -118,7 +118,7 @@
|
|||
<tr>
|
||||
<td align="center" valign="top" width="600">
|
||||
<![endif]-->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 350px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 500px;">
|
||||
|
||||
<!-- start copy -->
|
||||
<tr>
|
||||
|
@ -137,7 +137,7 @@
|
|||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align="center" bgcolor="#1a82e2" style="border-radius: 6px;">
|
||||
<a href="#$VERIFICATION_TOKEN" target="_blank" style="display: inline-block; padding: 16px 36px; font-family: sans-serif; font-size: 16px; color: #ffffff; text-decoration: none; border-radius: 6px;">Confirm Email Address</a>
|
||||
<a href="https://debtpirate.app/verify?u=$USER_ID&t=$VERIFICATION_TOKEN" target="_blank" style="display: inline-block; padding: 16px 36px; font-family: sans-serif; font-size: 16px; color: #ffffff; text-decoration: none; border-radius: 6px;">Confirm Email Address</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -148,15 +148,6 @@
|
|||
</tr>
|
||||
<!-- end button -->
|
||||
|
||||
<!-- start copy -->
|
||||
<tr>
|
||||
<td align="left" bgcolor="#ffffff" style="padding: 24px; font-family: sans-serif; font-size: 16px; line-height: 24px;">
|
||||
<p style="margin: 0;">If that doesn't work, copy and paste the following link in your browser:</p>
|
||||
<p style="margin: 0;"><a href="#$VERIFICATION_TOKEN" target="_blank">$VERIFICATION_TOKEN</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end copy -->
|
||||
|
||||
<!-- start copy -->
|
||||
<tr>
|
||||
<td align="left" bgcolor="#ffffff" style="padding: 24px; font-family: sans-serif; font-size: 16px; line-height: 24px; border-bottom: 3px solid #d4dadf">
|
||||
|
|
|
@ -99,6 +99,7 @@ async fn register_new_user_request(
|
|||
let new_user_confirmation_message = UserConfirmationMessage {
|
||||
email,
|
||||
name,
|
||||
user_id,
|
||||
verification_token: verification_token.clone(),
|
||||
};
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ pub fn start_emailer_service(
|
|||
let UserConfirmationMessage {
|
||||
email: recipient_email,
|
||||
name,
|
||||
user_id,
|
||||
verification_token,
|
||||
} = message;
|
||||
|
||||
|
@ -60,6 +61,7 @@ pub fn start_emailer_service(
|
|||
recipient_email.as_str(),
|
||||
new_user_confirmation_template_text.as_str(),
|
||||
name.as_str(),
|
||||
user_id,
|
||||
verification_token.as_str(),
|
||||
)
|
||||
.await;
|
||||
|
@ -72,10 +74,12 @@ async fn send_new_user_confirmation_email(
|
|||
recipient_email: &str,
|
||||
new_user_confirmation_template_text: &str,
|
||||
name: &str,
|
||||
user_id: i32,
|
||||
verification_token: &str,
|
||||
) {
|
||||
let body = new_user_confirmation_template_text
|
||||
.replace("$NAME", name)
|
||||
.replace("$USER_ID", user_id.to_string().as_str())
|
||||
.replace("$VERIFICATION_TOKEN", verification_token);
|
||||
|
||||
let message = Message::builder()
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
pub struct UserConfirmationMessage {
|
||||
pub email: String,
|
||||
pub name: String,
|
||||
pub user_id: i32,
|
||||
pub verification_token: String,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue