Skip to content

Instantly share code, notes, and snippets.

@iconecd
Created July 23, 2015 18:16
Show Gist options
  • Save iconecd/b4f434b46ab88d79e03c to your computer and use it in GitHub Desktop.
Save iconecd/b4f434b46ab88d79e03c to your computer and use it in GitHub Desktop.
<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