Hi guys! I faced with the issue related to the sending emails from AEM 6.2 to the email addresses which contain special characters. Example (passed as image, because editor is not correctly convert it):
Sending is failing with such message:
javax.mail.internet.AddressException: Local address contains control or whitespace in string bob.o’brien@example.com
After the brief check I found, that default AEM Mail Service (com.day.cq.mailer.DefaultMailService) and its bundle (com.day.cq.cq-mailer) are using libraries org.apache.commons.mail,version=1.5.0 and javax.mail.internet,version=1.5.0. InternetAddress class is not allow non-ASCII characters in local parts. Checked on AEM 6.4, the same versions are used in it.
In the same time I see that Java mail 1.6 supports internationalized (with non-ASCII characters) email (see https://stackoverflow.com/a/42645751 ).
So, my question do anyone faced with similar issue and how do you handle them? Because for me it looks like AEM doesn't support internationalized email addresses at all.
bob.o’brien@example.com