Email address validation

Discussion in 'PHP' started by iceman2000, Mar 28, 2008.

  1. #1
    When sending out email newsletters, or site notifications we often find that many of the addresses are bounced back at us. Maybe at one time these were valid email addresses, but their owners have closed accounts, or simply stopped using them for so long that they have been removed. The best solution to this problem is to validate these addresses before sending an email. I would like to know if that mailbox is open for business. In order to do that a request has to be sent to the SMTP server querying for the mailbox. This method of validation is much more effective than syntax validation and much more automated than taking bounced emails off your list by hand.

    The question is, how do we do this in PHP that covers:

    1. Syntax validation
    2. MXReecords Validation
    3. SMTP (Domain) validation, and
    4. Mailbox Validation

    Any help will be much apreciated.
     
    iceman2000, Mar 28, 2008 IP
  2. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    One problem you are going to run into right away is that MOST servers will respond with saying a mailbox is valid whether it is or isn't. This is done to prevent spammers from querying servers to find out what address they should spam. If you have double-opt-in, then you'll run into the issue less, but you're still going to eventually have problems with emails being bounced.
     
    Gordaen, Mar 28, 2008 IP
  3. iceman2000

    iceman2000 Peon

    Messages:
    129
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So you are saying that there is actually no soultion for this??

     
    iceman2000, Mar 29, 2008 IP
  4. iceman2000

    iceman2000 Peon

    Messages:
    129
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    iceman2000, Mar 29, 2008 IP