6 Replies Latest reply on Nov 13, 2007 3:09 AM by otisme

    Email Verification

    drmaves
      I would like to verfy that an email address is actually working before adding it to our database. Has anyone written a routine to do this that they would like to share?
        • 1. Re: Email Verification
          Steve Sommers Level 4
          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.
          • 2. Re: Email Verification
            drmaves Level 1
            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.
            • 3. Re: Email Verification
              drmaves Level 1
              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
              • 4. Re: Email Verification
                SafariTECH Level 1
                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)

                • 5. Re: Email Verification
                  tmollerus
                  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.
                  • 6. Re: Email Verification
                    otisme
                    There's a free webservice you might use, I'm guessing it only checks formatting:

                    http://www.webservicex.net/ValidateEmail.asmx?WSDL

                    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.

                    <cfinvoke
                    webservice=" http://www.webservicex.net/ValidateEmail.asmx?WSDL"
                    method="isValidEmail"
                    returnvariable="isValidEmailRet">
                    <cfinvokeargument name="email" value="mymy@dom.com"/>
                    </cfinvoke>
                    <!--- 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'--->
                    <cfoutput>
                    #variables.isValidEmailRet#
                    </cfoutput>

                    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


                    Colm