Search...
sendSetPasswordEmail( )
Sends a site member an email with a link to set their password.
Description
The sendSetPasswordEmail()
function returns a Promise that resolves
when the set password link is emailed to the member.
The set password link is valid for 3 hours, and it can be used only once. If the link expires, no changes are made to the password.
Syntax
function sendSetPasswordEmail(email: string, [options: SetPasswordEmailOptions]): Promise<boolean>
sendSetPasswordEmail Parameters
NAME
TYPE
DESCRIPTION
email
string
Login email of the member whose password will be set.
options
Optional
SetPasswordEmailOptions
Email display options.
Returns
Fulfilled - If the email is sent. Rejected - Error message.
Return Type:
Promise<boolean>
Was this helpful?
Email a member with a link to set their password
Copy Code
1import { authentication } from 'wix-members-frontend';23/* Sample options value:4* {5* hideIgnoreMessage: true6* }7*/89authentication.sendSetPasswordEmail(email, options)10 .then((status) => {1112 console.log(status);13 if (status === true) {1415 console.log('Email sent!');16 }17 return status;18 })19 .catch((error) => {20 console.error(error);21 });2223/* Promise resolves to a boolean */