paths in mail

This commit is contained in:
Mateusz Gruszczyński
2026-07-28 10:13:41 +02:00
parent 351dd081b5
commit d38b5b0b51
6 changed files with 60 additions and 23 deletions
+3 -3
View File
@@ -883,7 +883,7 @@ async fn send_account_action(
token: &str,
) -> Result<(), AuthError> {
let site = smtp.public_url.trim_end_matches('/');
let url = format!("{site}/?account_action_token={token}");
let url = format!("{site}/auth/account-action/{token}");
let sender = smtp
.from
.parse::<Mailbox>()
@@ -1954,7 +1954,7 @@ async fn send_registration_email(
let message = match token {
Some(token) => {
let confirmation_url = format!("{site}/?confirm_token={token}");
let confirmation_url = format!("{site}/auth/confirm/{token}");
let subject = "Confirm your RustPad account";
let text_body = format!(
"Hello {},\n\nYour RustPad account has been created.\nNickname: {}\nSite: {}\n\nConfirm the account within 24 hours by opening this link:\n{}\n",
@@ -2142,7 +2142,7 @@ async fn send_message(smtp: &SmtpConfig, message: Message, label: &str) -> Resul
async fn send_reset(smtp: &SmtpConfig, user: &User, token: &str) -> Result<(), AuthError> {
let site = smtp.public_url.trim_end_matches('/');
let reset_url = format!("{site}/?reset_token={token}");
let reset_url = format!("{site}/auth/reset-password/{token}");
let sender = smtp
.from
.parse::<Mailbox>()