Typically, there is no way to validate an email address. For various reasons, any mail administrator with half a brain turns off the VRFY command on their mailserver, which is the only 100% guaranteed way to validate an email address without sending a message and looking for a bounce or other error.
Other than that, you can take some precautions on the processing end, like checking for minimum length, the presence of '@', and a valid MX lookup on the domain name, and even a valid connection to port 25 of the host listed in that MX record. All of that stuff, though, is regular Java, with nothing to do with javax.mail. You can always try and send the message, then look for SendFailedException, but you'd have to do the send first. John > -----Original Message----- > From: Jack Li [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 09, 2002 9:54 AM > To: '[EMAIL PROTECTED]' > Subject: How to validate email address in JSP by using javax.mail? > > > Hi, How to validate email address in JSP by using javax.mail? > > > > Thanks, > > Jack Li > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
