getSenderDetails( )
Retrieves sender details.
Description
The sender details include the information displayed as the email sender's name and email address.
If you send an email campaign with a public email domain (e.g. @gmail.com or @yahoo.com), the email address will not be displayed in the 'from' header. Instead, the email address is replaced with @wixemails.com (or @wixsitemail.com for free users), and the sender's email is placed in the 'reply-to' header.
If you send an email campaign with an email from a Wix managed domain, that email will be displayed in the 'from' header.
If you send an email from a custom domain that is not managed by Wix, a line will be inserted that states that the email was sent via wixemails.com.
This function is not a universal function and runs only on the backend.
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function getSenderDetails(): Promise<GetSenderDetailsResponse>
getSenderDetails Parameters
This function does not take any parameters.
Returns
Return Type:
NAME
TYPE
DESCRIPTION
Current sender details.
Was this helpful?
1import { senderDetails } from 'wix-email-marketing.v2';23export async function getSenderDetails() {4 try {5 const result = await senderDetails.getSenderDetails();67 console.log(`Success! Your sender details have been retrieved.`)8 return result;9 } catch (error) {10 console.error(error);11 }12}1314/* Promise returns:15 * {16 * "senderDetails": {17 * "fromName": "User Name",18 * "fromEmail": "username@wix.com",19 * "dateVerified": "2023-08-10T09:24:14.729Z"20 * }21 * }22 */
1import { Permissions, webMethod } from 'wix-web-module';2import { senderDetails } from 'wix-email-marketing.v2';34export const getSenderDetails = webMethod(Permissions.Anyone, async () => {5 try {6 const result = await senderDetails.getSenderDetails();78 console.log(`Success! Your sender details have been retrieved.`)9 return result;10 } catch (error) {11 console.error(error);12 }13});1415/* Promise returns:16 * {17 * "senderDetails": {18 * "fromName": "User Name",19 * "fromEmail": "username@wix.com",20 * "dateVerified": "2023-08-10T09:24:14.729Z"21 * }22 * }23 */24