ISEMAIL
The function ISEMAIL outputs TRUE if given a validly-formatted email address and FALSE otherwise.
This function takes a single string as input. It then checks to see if the given string is a validly-formatted email address and outputs TRUE if it is, FALSE if it isn't.
Declaration
Parameters
string (required, type: string | email) The string that may or may not be a validly-formatted email address.
Return Values
result (type: boolean) The result of checking if the given string is a validly formatted-email; TRUE means that it is and FALSE means that it isn't.
Examples
The following example takes the string "support@airkit.com" and checks to see if it is a validly formatted email address. It is:
The following example takes the string "support@airkit" and checks to see if it is a validly-formatted email address. This string is nearly identical to the string given as input in the example above, but it lacks the top-level domain ".com". This is required in order for an email address to be valid, and thus "support@airkit" is not a valid email:
The following example takes the string "supportairkit.com" and checks to see if it is a validly-formatted email address. This string is nearly identical to the string given as input in the first, but it lacks the "@" symbol between the user name and the domain. This "@" symbol is required in order for an email to be validly formatted, and thus "supportairkit.com" is not a valid email:
The ISEMAIL function checks to see if the given input is a validly-formatted email address, but this is different from confirming that the email address actually exists. The following example takes the string "fake@notawebsite1.com" and checks to see if it is a validly-formatted email address. "fake@notawebsite1.com" is, in fact, a validly-formatted email address: it has a username, an "@" symbol, and a domain complete with the top-level domain ".com". The fact that "fake@notawebsite1.com" is a made-up email address at – at the time of writing this document – a non-existent domain does nothing to change the fact it is formatted like a proper email address:
There are limits to what sort of fake domain ISEMAIL will accept as valid. A valid email cannot have characters other than letters, numbers, and hyphens in the domain. The follow example checks to see if "fake@not_a_website.com" is a validly-formatted email address. Because of the presence of underscores in the domain, it isn't:
However, while the characters in the domain need to be of the correct type in order for ISMAIL to recognize the given input as a validly-formatted email address, they don't need to be meaningful. Indiscriminate keyboard mashing is a valid domain and even top-level domain, as long as the only characters entered within them are letters, numbers, and hyphens. The content of the username is even less discerning: most symbols, including underscores and exclamation marks, are allowed in a validly-formatted email address:
Last updated