LassoScript Utility
Basics Browse Detail

[Valid_Email]

Tag Link [Valid_Email] Category Utility
Type Substitution Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
Output Type Boolean Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x

Description

[Valid_Email] checks the format of an email address. If the parameter appears to be a valid email address then True is returned.

This tag does not check whether the specified email address can actually receive mail. Use the [Email_Send] tag to send a test message.

The optional -Domain parameter allows a comma separated list of top-level domains to be specified. Only email addresses in these domains will be returned as valid. For example, -Domain='com' will only return user@*.com addresses as valid.

The optional -StandardDomains parameter will check that the email address is defined in one of the standard top-level domains. This is equivalent to -Domain='com,gov,mil,net,org,int'.

The optional -HostName parameter allows a host name to be specified. Only email address on that host will be returned as valid. For example -HostName='example.com' will only return user@example.com addresses as valid.

Syntax

[Valid_Email: 'Email Address']

[Valid_Email: 'Email Address', -Domain='Domain']

[Valid_Email: 'Email Address', -StandardDomains]

Valid_Email: 'Email Address', -HostName='Host Name']

Parameters

Required Parameters
Email Address The email address to check.
Optional Parameters
-HostName Optional host name. If specified, the email address must be at this host name.
-Domain Optional comma-separated list of top-level domains. If specified, the email address must be defined on one of the top-level domains.
-StandardDomains Optional keyword automatically checks all standard top level domains (com, edu, gov, mil, net, org, int).

Examples

To check whether an email address is valid:

Use the [Valid_Email] tag. The following example checks whether an email address administrator@example.com is valid.

[Valid_Email: 'administrator@example.com']

True