About Sender Details
The Sender Details API contains the information that is displayed as the sender’s name and email address when sending an email from your Wix site.
With the Sender Details API you can:
Before you begin
Before you begin, it is important to note the following information.
If you send an email campaign with a public email domain (e.g. @gmail.com or @yahoo.com), the email address isn't 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.
Setup
To use the SenderDetails API, install the @wix/email-marketing
package using npm or Yarn:
1npm install @wix/email-marketing
or
1yarn add @wix/email-marketing
Then import { senderDetails }
from @wix/email-marketing
:
1import { senderDetails } from '@wix/email-marketing'
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves sender details.
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.
Permission Scopes
For app development, you must have one of the following permission scopes:function getSenderDetails(): Promise<GetSenderDetailsResponse>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Checks if the sender's email address will be used as from-address or replaced (not related to current sender details).
Permission Scopes
For app development, you must have one of the following permission scopes:function resolveActualFromAddress(fromAddress: string): Promise<ResolveActualFromAddressResponse>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates sender details.
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
.
Permission Scopes
For app development, you must have one of the following permission scopes:function updateSenderDetails(senderDetails: SenderDetails): Promise<UpdateSenderDetailsResponse>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Verifies the sender's email using a verification code sent to the user's email address upon update.
Permission Scopes
For app development, you must have one of the following permission scopes:function verifyEmail(verificationCode: string): Promise<void>