PHP Classes

Exclusion of Domains?

Recommend this page to a friend!

      Check Mail  >  All threads  >  Exclusion of Domains?  >  (Un) Subscribe thread alerts  
Subject:Exclusion of Domains?
Summary:It appears that this script doesn't even check certain domains
Messages:4
Author:Stephen Musgrave
Date:2004-12-26 14:30:13
Update:2007-01-21 12:35:40
 

  1. Exclusion of Domains?   Reply   Report abuse  
Picture of Stephen Musgrave Stephen Musgrave - 2004-12-26 14:30:13
I ran some tests with this script and it told me that some addresses do not exist that I know *do* exist.

I saw that it has an array called $domain_rules which has a series of domain names in it. If the email address you are sending to is at one of these domains, the script automatically returns false -- it doesn't even try to verify the email address. Worse, there is no indication that the script didn't try the address. It should at least skip that email address it before telling you that it doesn't exist. I suppose this is because some domains/email hosts doesn't support this sort of SMTP service?

But that doesn't hold water. Both aol.com and yahoo.com are listed in the $domain_rules array. I removed them and tested again. The AOL address still came back false even though it exists, so I suppose AOL doesn't support this sort of interface? But the yahoo.com address came back as true, that it *does* exist. In both cases, it seems that the $domain_rules is unnecessary because at the very worst I received I got false for the AOL address which is what I had gotten anyway with the domain in the $domain_rules array.

In another instance, I put a Road Runner address in the list, a popular service provider in the USA. It returned false for this address.

Furthermore, there should be documentation to this effect, but no warning exists that there are certain domains aren't even tried.

My conclusion, and correct me if I am wrong, is that this interface is not widely supported amongst mail hosts and therefore can't be relied upon.

  2. Re: Exclusion of Domains?   Reply   Report abuse  
Picture of Filippo Toso Filippo Toso - 2004-12-26 16:04:58 - In reply to message 1 from Stephen Musgrave
> I ran some tests with this script and it told me that some addresses
> do not exist that I know *do* exist.

Big providers like AOL and YAHOO accepts emails even if the destination email address doesn't exists, this happens because they have thousand mail server that handle their SMTP/POP traffic and it could take a lot of time to check if an address exists or not.

The domains rules array avoid the class to check that kind of addresses that will always return a false answer on the real status of the email address checked.


  3. Re: Exclusion of Domains?   Reply   Report abuse  
Picture of Jose Jose - 2007-01-20 23:47:35 - In reply to message 1 from Stephen Musgrave
And is posible check in other way, maybe reading a reply in the server? Like:

---- The following addresses had permanent fatal errors ----- <1234@alegropcs.net>
(reason: 550 5.1.1 unknown or illegal alias: 1234@alegropcs.net)


Or similars?

Thanks


  4. Re: Exclusion of Domains?   Reply   Report abuse  
Picture of Filippo Toso Filippo Toso - 2007-01-21 12:35:40 - In reply to message 3 from Jose
The class already does it.

If the server answers a 2XX code, the mail is valid, otherwise it's invalid. For the domains in the $domain_rules array, the class doesn't made the socket check because these server returns a 2XX code even in the case the email doesn't exist.