Re: InternetAddress exception
Friday, January 18, 2002 06:28 AM
I believe, and I might be wrong here, that the InternetAddress class will only accept US-ASCII characters and that your string might contain characters not belonging to this set. You might want to check out RFC822.
To use the 'InternetAddress.toUnicodeString' method:
InternetAddress add = new InternetAddress("email@example.com");
String add = in.toUnicodeString();
This still wouldn't allow you to use an InternetAddress object containing non- ASCII characters. What it will do is return the ASCII characters that make up the address as Unicode ones.