Skip to main content

Does JavaMail support Internationalized Domain Names (IDN)?

  2 posts   Feedicon  
Replies: 1 - Last Post: November 17, 2012 01:20
by: Bill Shannon
showing 1 - 2 of 2
Posted: November 16, 2012 08:21 by veita
If not, are there plans to support IDNs in the future?

Currently especially constructing InternetAddress with IDNs fails with


Exception in thread "main" javax.mail.internet.AddressException: Domain contains control or whitespace in string ``book@bücher.ch''
at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1253)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:1091)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:633)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:111)

Posted: November 17, 2012 01:20 by Bill Shannon
JavaMail has no support for IDNs.

I believe email addresses in messages can only contain IDNs in the ASCII Compatible Encoding.
The java.net.IDN class can convert to this form.

Handling IDNs more directly could be considered for a future release of JavaMail.
Replies: 1 - Last Post: November 17, 2012 01:20
by: Bill Shannon
 
 
Close
loading
Please Confirm
Close