From 8015bb94319e1d0434275599fdcbc7d0d28c5ea8 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 19 Aug 2011 06:11:03 -0400
Subject: [PATCH] - Followup to r5097, fix: match From with full address spec.

---
 program/steps/mail/compose.inc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 3a3847a..4449ea0 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -274,16 +274,17 @@
 
     // 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;
     }

--
Gitblit v1.9.1