Skip to main content
Participating Frequently
November 21, 2007
Question

Something to check email addresses ?

  • November 21, 2007
  • 6 replies
  • 702 views
Hi,
I was given a long list of email addresses from a client, some of which are badly formatted, don't include an @, or a dot, etc.
Is there a quick routine or program out there that can look through a long list of email addresses, and ID the bad ones, so I don't have to go through them with a fine-toothed comb ?

-MK
This topic has been closed for replies.

6 replies

keller18Author
Participating Frequently
November 26, 2007
I'm still getting errors with this.

This is what I code:

<cfset eml="mgdriver@yahoo.com">
<CFIF isValid("email",eml)>
email syntx is ok
<CFELSE>
error found
</CFIF>

and, I get:

Error resolving parameter ISVALID

Was IsVALID only on CF7, or the "email" as a test case for ISVALID ?

Inspiring
November 26, 2007
IsValid was introduced in MX7. If you're running an earlier version you might try the IsEmail function at cflib.org
http://cflib.org/udf.cfm?ID=216
Inspiring
November 22, 2007
<CFIF isvalid("email",echeck.eml)>
email syntx is ok
<CFELSE>
error found
</CFIF>

Inspiring
November 21, 2007
Usage of all functions and tags are described in the cfml reference manual. If you don't have one, the internet does.

To find a tag, google "<cftagname> x", where x is the cold fusion verion number you want. To find a function, google "coldfusion functionname x" You know the name of the function.
keller18Author
Participating Frequently
November 21, 2007
OK, since these are already in a db, I ran a simple query, using ID and EML as the variables, but I'm not sure how to use the isvalid portion and form.emailaddr for a queried search.. any hints ?

<cfoutput query="echeck">

<cfif isDefined("echeck.eml")>
<cfif isValid("eml",form.emailAddr)>
<cfelse>
#id# #eml# needs to be updated
</cfif>
<cfelse>
</cfif>

</cfoutput>
keller18Author
Participating Frequently
November 21, 2007
Thanks, Dan. I'll give it a shot.
I haven't answered someone else's ? for a while, but I plan to. THanks :)
Inspiring
November 21, 2007
You can use cfloop to go through the list. You can use isValid() to see if it is in the correct format.