Search.../

verifyEmail( )

Developer Preview

Verifies the sender's email using a verification code sent to the user's email address upon update.

Description

This function is not a universal function and runs only on the backend.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function verifyEmail(verificationCode: string): Promise<void>

verifyEmail Parameters

NAME
TYPE
DESCRIPTION
verificationCode
string

Verification code.

Returns

Return Type:

Promise<
void
>

Was this helpful?

Verifies an updated sender address with a verification code

Copy Code
1import { senderDetails } from 'wix-email-marketing.v2';
2
3// Sample verificationCode: "Sw4e7"
4
5export async function myVerifyEmailFunction(verificationCode) {
6 try {
7 const result = await senderDetails.verifyEmail(verificationCode);
8
9 console.log('Success! Your email address has been verified')
10 return result;
11 } catch (error) {
12 console.error(error);
13 }
14}
15
16/* Promise returns void */