Skip to main content

generate_reset_password_email

Generates a password recovery email by rendering a template with a reset token link and project-specific metadata. Returns an EmailData object containing the formatted HTML content and the email subject line.

def generate_reset_password_email(
email_to: str,
email: str,
token: str
) - > EmailData

Generates the email subject and HTML content for a password recovery request using a localized template.

Parameters

NameTypeDescription
email_tostrThe recipient's email address where the recovery message will be sent.
emailstrThe username or account email address associated with the password reset request.
tokenstrThe unique authentication token used to verify the password reset link.

Returns

TypeDescription
EmailDataAn object containing the rendered HTML body and the formatted subject line for the password reset email.