Skip to main content

send_reset_email

Function send_reset_email 

Source
pub async fn send_reset_email(
    db: &Db,
    mailer: &Mailer,
    base_url: &str,
    address: &str,
) -> Result<(), AppError>
Expand description

Mint a reset token for address and email the reset link. No-op when no account matches the address.

Pure orchestration over explicit dependencies — testable by calling directly with a capture mailer. The forgot-password handler runs it on a detached task.