aspose file tools
The moose likes Java in General and the fly likes Validating email address! Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Validating email address!" Watch "Validating email address!" New topic
Author

Validating email address!

Tulsi Rai
Ranch Hand

Joined: Jun 26, 2002
Posts: 55
Hi All,
does anyone have a good server-side email validation algorithm or codes? i really need help on it. thanks.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

One of the easiest ways to do this (assuming by "email address" you mean an address suitable for SMTP - i.e. RF822) is to use the package InternetAddress in the JavaMail extension - which throws an AddressException if the String does not match RFC822 syntax.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Also, if you're using Struts, you can use their built-in validator which has FieldChecks.validateEmail() -- granted you never call this directly, you set it up through the Struts Validator (it's also credit card, date, url and a variety of primitives and ranges).


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Do you want to check the syntax, whether the email is in use, or whether the email was really send by the person, owning that adress?


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validating email address!
 
Similar Threads
Which one do I do first.
2-dimentional array
The Head First Formula
WA #1.....word association
310-080 vs 310-081