Override Email Sender Details
Learn how to override email sender details such as From Name and From Email using the Notification Event API or the email editor in Fyno.
You can override details in your email in 2 ways.
- Using API
- Using Email editor
How to override sender details using API?
During the integration setup, you would have specified a 'From_Email' address. If you have multiple email addresses such as noreply@xyz.com, marketing@xyz.com, cs@xyz.com, and you wish to use the appropriate email address depending on the communication you send, you can dynamically assign values to From_Email. To achieve this, please follow the steps outlined below.
Define Default Email
Within the integrations popup, include 'from_email' as shown below. In this example, tech@fyno.io will serve as the default From Email if the provided email ID in the payload is not valid. If you prefer not to use the default email, simply specify 'from_email' in the respective field.
Override Sender Details via API
In the Notification event payload, you need to pass the from_email as shown below. By doing so, the emails triggered via this notification event will go from 'tech@fyno.io'.
curl -X POST 'https://api.fyno.io/v1/<WorkspaceID>/test/event' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"event": "ReleaseNote",
"to": {
"email": "xyz@gmail.com"
},
"data": {
"name": "Rahul",
"key": "value"
},
"channel": {
"email": {
"override": {
“from_email": “tech@fyno.io"
}
}
from_name field also.How to override sender details in Email editor
To override the sender details configured in the Service Provider integration, follow the below steps