Tuesday 11th May 2010

by Mr Me


This library can be used to check whether an email address is valid or not before sending any email.

This is not a syntax validation. It communicates with mail server and check whether the account is really existing or not.

The steps involved in this library are:

  1. Check syntax of email ( if it is not a valid email syntax wise , returns ERROR:EMAIL_SYNTAX )
  2. Find domain name from email address
  3. Get MX record using Net_DNS_Resolver library (return  ERROR:NO_MX if mx record cannot be found)
  4. Try to open port 25 of each MX server (return ERROR:NO_ACTIVE_MX if no response from any server )
  5. Send the following commands
    HELO email_domain
    MAIL FROM: <from@email.com>
    RCPT TO: <receiptant_email_here>
  6. If the response contain any error code (Numbers above 500  or timeout , it returns “ERROR:UNVERIFIED“)
  7. Else it returns SUCCESS

You can download the source code from : http://www.sajithmr.me/MxCheck.txt

· · · ◊ ◊ ◊ · · ·

One Response to “MxCheck PHP library”

  1. bangladeshi says:

    Hello sir i need the complete php coding,
    ALso also thankx for this

· · · ◊ ◊ ◊ · · ·

Leave a Reply

Need your support
More in php (28 of 108 articles)

1) Amazing game developed with html5 (without any flash) http://www.kevs3d.co.uk/dev/asteroids/ 2) 12 Examples http://htmlfive.appspot.com/ 3) HTML5 Demos http://html5demos.com/ 4) HTML5 ...