The IsEmailAddress function returns either True or False depending on if the value is a valid email address. A practical use case is on CloudPages for user submitted email address values.
Example:
%%[
set @email = ‘test@ampscript.com’
IF IsEmailAddress(@email) == ‘true’ THEN
set @msg = ‘Email is valid’
ELSE
set @msg = ‘Email is NOT valid’
ENDIF
]%%
%%=v(@msg)=%%
Output:
Email is valid
Explanation:
The @email variable is set as a valid email of “test@ampscript.com”. When evaluated using the IsEmailFunction function, it returns True because it is a valid email address. The IsEmailFunction function can also be used on data values to determine if the value is not a valid email address if it returns False.