Re: InternetAddress exception
Posted By:
Simon_Ablett
Posted On:
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("name@companyname.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.
Regards,
Simon