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.
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.
Below is the link to the solution found on phbb fourm: http://www.phpbb.com/community/viewtopic.php?t=280755