Hi Community,
I need to extract the domain name from an email address (e.g., "abc@gmail.com") and include it in an email template. Specifically, I want the email to display the domain of the sender (e.g., "@gmail.com"). Is it possible to achieve this in an AJO or through an automated workflow?
Example:
If the sender's email is "abc@gmail.com," I want the email body to print:
"Hi ABC,
This email is coming from the @gmail.com domain."
Is there a way to automate this?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@Ajo_WisdomChase Add the logic for email surface selection criteria, as defined by the marketer, within the expression fragment, and use this fragment for email personalization. For instance, the marketer configures the email channel section in the email settings based on the customer's country. The same logic can be implemented in the expression fragment (e.g., if the customer is from France, display the fr.XYZ.com domain). Note that this approach does not fetch the domain from the 'FROM address' configured in the email channel; the logic for domain selection based on the customer's country needs to be explicitly implemented.
Hi @Ajo_WisdomChase ,
You can utilize OOTB Helper function {%= extractEmailDomain(string) %} to achieve the same . In Email body personalize the same using the above mentioned function. Hope this will help you in achieving the objective.
Thanks,
Somen
Views
Replies
Total Likes
Thanks @somen-sarkar ,
1) which attribute i am using for replace the string?
{%= extractEmailDomain(string) %}
2) i have 4 domain its automatically fetch the current FROM address domain.
@somen-sarkar @Anuhya-Y @DavidKangni @Mohan_Dugganab @SatheeskannaK @Parvesh_Parmar
Views
Replies
Total Likes
Pass the "From" address as a variable to String {%= extractEmailDomain(string) %} to retrieve the domain name.
Thanks,
Somen
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @somen-sarkar ,
Thanks for update, But i want automated this process.
I have an email template that includes a domain name, and I want to dynamically replace the domain based on the selected channel surface. The template is as follows:
Email Template:
"Hi XYZ,
This email was sent to you by @in.xyz.com Domain."
I have 100 available channel surfaces, each with its corresponding domain:
@in.XYZ.com
@us.XYZ.com
@fr.XYZ.com
@eu.XYZ.com
.
.
.
Suppose I choose any surface channels; the domain name in the email template should automatically update to reflect the selected channel. For example, if the selected surface is fr, the email template should look like this:
"Hi XYZ,
This email was sent to you by @fr.XYZ.com Domain."
How can I achieve this dynamic replacement of the domain in the email template?
Views
Replies
Total Likes
@Ajo_WisdomChase Add the logic for email surface selection criteria, as defined by the marketer, within the expression fragment, and use this fragment for email personalization. For instance, the marketer configures the email channel section in the email settings based on the customer's country. The same logic can be implemented in the expression fragment (e.g., if the customer is from France, display the fr.XYZ.com domain). Note that this approach does not fetch the domain from the 'FROM address' configured in the email channel; the logic for domain selection based on the customer's country needs to be explicitly implemented.
Views
Likes
Replies
Views
Likes
Replies