Hi all,
On Marketing Emails, when user design and go-live email, there is any tool or script that we can validate email address/ form name with the specific rules? Without validate, email can be sent out with misstype, fake or scam email address to a huge segment. User can type in without any restriction.
Can we add more condition in this script?
such as From address/ from name need to be exact matched with below value in the defined list, if not match, show error and stop golive
Hi Duy Bao VN1,
According to your description, I use JS script to implement verification email address.
Below is the JS code:
function validateEmail(execuationContext)
{
var formContext = execuationContext.getFormContext();
var fromEmailAddress = formContext.getAttribute("msdyncrm_fromemail").getValue();
console.log(fromEmailAddress);
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if(fromEmailAddress.match(mailformat))
{
alert("Valid email address!");
}
else
{
alert("Invalid email address!");
}
}
Find this field and add this JS code in the Events tab. Save and publish.
Here are the test results:
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156