Created
July 23, 2015 18:16
-
-
Save iconecd/b4f434b46ab88d79e03c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public boolean function isValidEmail ( | |
required string email | |
) { | |
var ia = CreateObject( "java", "javax.mail.internet.InternetAddress" ); | |
try { | |
ia.parse( arguments.email, false ); | |
} catch ( any e ) { | |
return false; | |
} | |
return true; | |
} | |
writedump(isvalidemail('jake')); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment