Thanks, John. I see what you mean. But we got the email address from our web pages. Some people are sending disgusting messages with fake email addresses. So, we don't want to reply to those invalid email addresses. I tried to validate the email address by sending a confirmation mail. I am trying to catch SendFailedException to validate the address. But it did not generate the exception. What else can I do?
Thanks, Jack Li -----Original Message----- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 10:03 AM To: 'Tomcat Users List' Subject: RE: How to validate email address in JSP by using javax.mail? 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
