Simply pass a field which contains an e-mail address to the function and either a 1 (valid) or 0 (invalid) will be returned as output.
This routine is not meant to be an all-encompassing solution for identifying invalid e-mail addresses, but rather a quick / easy check routine to catch obvious errors and mistakes.
Examples of how to run the function:
dbo.ufn_E_Mail_Validator ('firstname.lastname@example.org') AS is_valid_yes
,dbo.ufn_E_Mail_Validator ('me@@nowhere.com') AS is_valid_no
Or... against a table, returning only invalid e-mail addresses (NULL values are considered valid by the function as they are essentially "unknown"):
,dbo.ufn_E_Mail_Validator (CC.e_mail) AS is_valid
dbo.ufn_E_Mail_Validator (CC.e_mail) = 0