From 8015bb94319e1d0434275599fdcbc7d0d28c5ea8 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 19 Aug 2011 10:11:03 +0000 Subject: [PATCH] - Followup to r5097, fix: match From with full address spec. --- program/steps/mail/compose.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 3a3847a58..4449ea0b2 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -274,16 +274,17 @@ else if (count($MESSAGE->identities)) { // use From header if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) { - if ($MESSAGE->headers->from == $ident['email_ascii']) { + if ($MESSAGE->headers->from == $ident['ident']) { $from_idx = $idx; break; } } - else if ($compose_mode == RCUBE_COMPOSE_REPLY && $MESSAGE->headers->from == $ident['email_ascii']) { + // reply to yourself + else if ($compose_mode == RCUBE_COMPOSE_REPLY && $MESSAGE->headers->from == $ident['ident']) { $from_idx = $idx; break; } - // use reply-message recipients + // use replied message recipients else if (in_array($ident['email_ascii'], $a_recipients)) { $from_idx = $idx; }