From 663534468c5f4bc974386f0df491b46de1ae5437 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 12 Oct 2010 14:21:57 -0400
Subject: [PATCH] - Fix setting identity when composing a draft or edited message
---
program/steps/mail/compose.inc | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 88fa425..80cc7d1 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -466,10 +466,11 @@
// Set identity
foreach ($user_identities as $sql_arr) {
// set draft's identity
- if ($compose_mode == RCUBE_COMPOSE_DRAFT) {
- if (strstr($MESSAGE->headers->from, $sql_arr['email']))
+ if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) {
+ if ($MESSAGE->headers->from == format_email_recipient($sql_arr['email'], $sql_arr['name'])) {
$from_id = $sql_arr['identity_id'];
break;
+ }
}
// set identity if it's one of the reply-message recipients (with prio for default identity)
else if (in_array($sql_arr['email'], $a_recipients) && (empty($from_id) || $sql_arr['standard']))
--
Gitblit v1.9.1