Good day.
I tested support for IDN in the new version of roundcube.
When I tried to send to "mailtest@пример.испытание" (
ICANN e-mail test), I got an error "Please enter at least one recipient". Same error I got when trying to send to punicode notation "mailtest@xn--e1afmkfd.xn--80akhbyknj4f".
However, when I tried to write the address "mailtest@xn--e1afmkfd.xn--80akhbyknj4f" in the "Copy" field, the letter sent successfully.
Although when I tried to write the address "mailtest@пример.испытание" in the "Copy" field I got an error "Invalid e-mail address: xn--mailtest@-o0h6a0cxbod.xn--80akhbyknj4f"
In the last error address incorrectly encoded. When I view in roundcube sent letter, address "mailtest@xn--e1afmkfd.xn--80akhbyknj4f" also incorrectly decoded to "mailtest@xn--e1afmkfd.испытание".
As you can see, "username@" is perceived as part of the domain name, resulting in a domain name is not correctly encoded/decoded, as well as username is corrupted.
<?php
echo idn_to_ascii('mailtest@пример.испытание');
?>
xn--mailtest@-o0h6a0cxbod.xn--80akhbyknj4f
<?php
echo idn_to_ascii('пример.испытание');
?>xn--e1afmkfd.xn--80akhbyknj4f
<?php
echo idn_to_utf8('mailtest@xn--e1afmkfd.xn--80akhbyknj4f');
?>mailtest@xn--e1afmkfd.испытание
<?php
echo idn_to_utf8('xn--e1afmkfd.xn--80akhbyknj4f');
?>пример.испытание
sysinfo:
FreeBSD 8.1
PHP 5.3.5
PHP intl 1.1.2
P.S. Thanks for great webmail client!