Eric Creese said:
> Aside from _javascript_ validation of email address, what is a good
> method to validate an email address before it is sent?

The best way to test is to run it through the same steps that it would
be ran through if it was actually used. The question is how far you
want to take it.

First (easy) step is to validate that it is syntactically correct.
Google for a regex or build one of of RFC 2822.

Second step is to see if the domain exists. There are several tags
available to do DNS lookups.

Third step would be to see if there is something listening on port 25
of the designated mail server. Simply telnet to it and you will see.

Fourth step would be to verify the email address at the server. That
is what the command VRFY is for. But since it is used by spammers, you
might just as well start an actual transaction like a real MTA and
abort after the RCPT TO.

Fifth step would be to send an email.

Jochem


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to