"Steve Werby" <[EMAIL PROTECTED]> writes:
> "Clayton Dukes" <[EMAIL PROTECTED]> wrote:
> > How can I write code that will search the database and check the
> > validity > of an email address, and if it's bad, to remove that
> > entry from the database?
> Like Tom said, use regex to check the email is of a valid format. A small
> percentage of servers can be contacted to find whether an email address is
> valid, but fewer and fewer are allowing this so it's completely unreliable.
There's a nifty little open source program called `vrfy' which does
nice things about email veryfication. Finding it is left as an
exercise to the interested (I found it in FreeBSD's ports). Excerpt
from the man page:
vrfy - Verify electronic mail addresses
vrfy [options] [-v] address [host]
vrfy [options] [-v] -f [file] [host]
vrfy [options] [-v] -p domain
vrfy [options] [-v] -T domain [name]
vrfy is a tool to verify electronic mail addresses. The
only required parameter is the address to be verified.
The actual verification will be carried out at the remote
machine where mail to the given address would normally be
delivered. This may be a mail exchange host and not the
final destination host. If an explicit host is given as
the second argument on the command line, the specified
address is verified at that machine.
The output of the program shows whether or not the address
can be handled at the contacted host. Error messages will
be printed if the address is invalid. If the address is
recognized, the output shows the remote host's notion of
the (possibly translated) address. If it represents a
local user at that host, additional information about the
user may be displayed.
Note that if the address is accepted by the contacted
host, but this is not the final destination host, one
still cannot be sure that the address represents a valid
It is a handy tool to verify local mail addresses.
If you have set up a .forward file, you can verify your
own address to check that the forwarding is done properly.
If you specify an arbitrary name, you can check whether
this resolves to any valid recipients.
i=1; while 1, hilb(i); i=i+1; end
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]