Search.../

updateSenderDetails( )

Developer Preview

Updates sender details.

Description

If the fromEmail is changed, a verification code will be sent to the new email address.

If verification is needed, a verification email will be sent to the user, and the returned verificationNeeded value will be true.

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 updateSenderDetails(senderDetails: SenderDetails): Promise<UpdateSenderDetailsResponse>

updateSenderDetails Parameters

NAME
TYPE
DESCRIPTION
senderDetails
SenderDetails

New sender details.

Returns

Return Type:

Promise<
UpdateSenderDetailsResponse
>
NAME
TYPE
DESCRIPTION
verificationNeeded
boolean

Whether email address needs verification.

Was this helpful?

Updates sender details

Copy Code
1import { senderDetails } from 'wix-email-marketing.v2';
2
3// Sample object:
4// {
5// "senderDetails": {
6// "fromName": "User",
7// "fromEmail": "newemail@address.com"
8// }
9// }
10
11export async function myUpdateSenderDetailsFunction(senderDetails) {
12 try {
13 const result = await senderDetails.updateSenderDetails;
14
15 console.log(`Success! SenderDetails updated.`)
16 return result;
17 } catch (error) {
18 console.error(error);
19 }
20}
21
22/* Promise returns:
23 * {
24 * verificationNeeded: true
25 * }
26 */