Search.../

resolveActualFromAddress( )

Developer Preview

Checks if the sender's email address will be used as from-address or replaced (not related to current sender details).

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.

Authorization

Request

This endpoint does not take any parameters

Response Object

NAME
TYPE
DESCRIPTION
actualFromAddress
string

Actual from-address that will be used for email distribution.

Status/Error Codes

Was this helpful?

Compares the sender address against a replacement address (dashboard page code)

Copy Code
1import { senderDetails } from 'wix-email-marketing.v2';
2
3export async function myResolveActualFromAddressFunction(fromAddress) {
4 try {
5 const result = await senderDetails.resolveActualFromAddress(fromAddress);
6
7 console.log('Success! From address has been resolved.')
8 return result;
9 } catch (error) {
10 console.error(error);
11 }
12}
13
14/* Promise returns:
15 * {
16 * "actualFromAddress": "myaddress@wix.com"
17 * }
18 */
Compares the sender address against a replacement address (export from backend code)

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { senderDetails } from 'wix-email-marketing.v2';
3
4export const myResolveActualFromAddressFunction = webMethod(Permissions.Anyone, async (fromAddress) => {
5 try {
6 const result = await senderDetails.resolveActualFromAddress(fromAddress);
7
8 console.log('Success! From address has been resolved.')
9 return result;
10 } catch (error) {
11 console.error(error);
12 }
13});
14
15/* Promise returns:
16 * {
17 * "actualFromAddress": "myaddress@wix.com"
18 * }
19 */
20