| | |
| | | else if (!empty($MESSAGE->headers->from)) |
| | | $fvalue = $MESSAGE->headers->from; |
| | | |
| | | // Reply to message sent by yourself (#1487074, #1489230) |
| | | // Reply to message sent by yourself (#1487074, #1489230, #1490439) |
| | | // Reply-To address need to be unset (#1490233) |
| | | if (!empty($ident) && empty($replyto) |
| | | && in_array($ident['ident'], array($fvalue, $MESSAGE->headers->from)) |
| | | ) { |
| | | $fvalue = $MESSAGE->headers->to; |
| | | if (!empty($ident) && empty($replyto)) { |
| | | foreach (array($fvalue, $MESSAGE->headers->from) as $sender) { |
| | | $senders = rcube_mime::decode_address_list($sender, null, false, $charset, true); |
| | | |
| | | if (in_array($ident['email_ascii'], $senders)) { |
| | | $fvalue = $MESSAGE->headers->to; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // add recipient of original message if reply to all |
| | |
| | | if ($v = $MESSAGE->headers->cc) |
| | | $fvalue .= (!empty($fvalue) ? $separator : '') . $v; |
| | | // Use Sender header (#1489011) |
| | | if (($v = $MESSAGE->headers->get('Sender', false)) && strpos($v, '-bounces@') === false) |
| | | $fvalue .= (!empty($fvalue) ? $separator : '') . $v; |
| | | if ($v = $MESSAGE->headers->get('Sender', false)) { |
| | | // Skip common mailing lists addresses: *-bounces@ and *-request@ (#1490452) |
| | | if (empty($MESSAGE->headers->others['list-post']) || !preg_match('/-(bounces|request)@/', $v)) { |
| | | $fvalue .= (!empty($fvalue) ? $separator : '') . $v; |
| | | } |
| | | } |
| | | |
| | | // When To: and Reply-To: are the same we add From: address to the list (#1489037) |
| | | if ($v = $MESSAGE->headers->from) { |
| | |
| | | |
| | | return $out; |
| | | } |
| | | |
| | | |
| | | function rcmail_compose_editor_mode() |
| | | { |