You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as stated in #8106, the fix resulted in sending from domains with special characters no longer working.
The previous code in 1.4.11 was:
// ... if there is no identity record, this might be a custom from
else if (($from_string = $this->email_input_format($from))
&& preg_match('/(\S+@\S+)/', $from_string, $m)
) {
$from = trim($m[1], '<>');
}
// ... otherwise it's empty or invalid
else {
$from = null;
}
which included $this->email_input_format($from) and automatically converted something like myuser@mydomäin.com to myuser@xn--mydomin-9wa.com. This is no longer the case in the new code (1.4.12):
else {
// ... if there is no identity record, this might be a custom from
$from_addresses = rcube_mime::decode_address_list($from);
if (count($from_addresses) == 1) {
$from = $from_addresses[1]['mailto'];
$from_string = $from_addresses[1]['string'];
}
// ... otherwise it's empty or invalid
else {
$from = null;
}
}
I could fix this by changing this line and include the call to $this->email_input_format:
// ... if there is no identity record, this might be a custom from
$from_addresses = rcube_mime::decode_address_list($this->email_input_format($from));
And another issue popped up with the new code: If using a display name in the identity with Umlauts like My näme the email can be sent, but the recipient recieves it as My näme.
You can test this like:
$from = 'My näme <my.name@my.domain.tld>';
var_dump($from);
// ... if there is no identity record, this might be a custom from
$from_addresses = rcube_mime::decode_address_list($from);
var_dump($from_addresses);
die();
which results to:
string(32) "My näme <my.name@my.domain.tld>"
array(1) {
[1]=>
array(3) {
["name"]=>
string(10) "My näme"
["mailto"]=>
string(21) "my.name@my.domain.tld"
["string"]=>
string(34) "My näme <my.name@my.domain.tld>"
}
}
Currently using roundcube 1.4.12 on PHP 7.4.
The text was updated successfully, but these errors were encountered:
Hi,
as stated in #8106, the fix resulted in sending from domains with special characters no longer working.
The previous code in 1.4.11 was:
which included
$this->email_input_format($from)
and automatically converted something likemyuser@mydomäin.com
tomyuser@xn--mydomin-9wa.com
. This is no longer the case in the new code (1.4.12):I could fix this by changing this line and include the call to
$this->email_input_format
:And another issue popped up with the new code: If using a display name in the identity with Umlauts like
My näme
the email can be sent, but the recipient recieves it asMy näme
.You can test this like:
which results to:
Currently using roundcube 1.4.12 on PHP 7.4.
The text was updated successfully, but these errors were encountered: