Fix identity-selection using Return-Path headers (#1489241)

pull/117/head
Thomas Bruederli 11 years ago
parent 08f5bbd26b
commit ccce3cce3a

@ -1803,9 +1803,8 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r
// Try Return-Path
if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) {
foreach ($identities as $idx => $ident) {
$ident = str_replace('@', '=', $ident['email_ascii']) . '@';
foreach ((array)$return_path as $path) {
if (strpos($path, $ident) !== false) {
if (stripos($path, $ident['email_ascii']) !== false) {
$from_idx = $idx;
break 2;
}

Loading…
Cancel
Save