This content has been marked as final. Show 6 replies
There are some regular expressions that can be used to check whether or not the format of an email address is correct. In the past I have seen some tags to validate whether or not an email server is valid and online. But I have not found a sure fire way to determine whether or not an actual email account on an email server is valid. There are two issues that come into play: privacy and SPAM. Different email servers are configured differently so there is no 100% method that I know of to validate beyond the address format and whether or not an email server exists.
Verifying that the email is a properly formatted email address can be handled through Coldfusion - what I'm interested in is checking to see if it exists on the server. I've seen this done on websites like this: http://www.email-unlimited.com/tools/verify-email.aspx which works - I checked it and it works - so there must be a way.
Steve, I take it back. After trying the service I referred to in the previous message with a few more domains I did receive an ANTI SPAM response. So you are correct in saying it's not reliable - darn. Here are a few domains that sent the ANTI SPAM response.
hotmail.com - antispam error
cbs.com - antispam error
bloomberg.com - antispam error
Querying to see if a mail address exists can be a sure fire way of getting your server blocked. it is a common way for spammers to find addresses by running a generator against an inquiry loop.
If you are asking because you want to run a mailing list etc, you need to use a double-opt-in method for adding addresses; and make sure you never send email to an address that does not confirm validation. Never add addresses manually, only allow the end-user to add them and then make them verify it.
As long as your mail server has RDNS, SPF, is not an open relay, and has valid domain MX information, mail servers won't care of you send through the occassional dead address. What matters more is how you handle dead addresses when you find them. ( i.e. remove them immediately)
I agree that there's no reliable way to check with a remote SMTP server whether a particular email address is good. I'd suggest using two techniques: first, use client-side and server-side validation to make sure that the email is at least formatted correctly. Then process your bouncebacks to see whether any particular address has bounced.
There's a free webservice you might use, I'm guessing it only checks formatting:
If you open web services in Dreamweaver and give it the above url, it generates
the cfinvoke code below, which you can drag into your code.
<cfinvokeargument name="email" value="firstname.lastname@example.org"/>
<!--- add code below to give Boolean, 'yes', only. If email is malformed it gives an error. Use with a form and code to check for 'yes'--->
If the email passes the above test, usual way is to send an email to that address to verify the user exists, ask if they sent the email, click return link to do something eg add them to database, etc