From a656569fe2561405c5ea7325928dc19aa446b99f Mon Sep 17 00:00:00 2001 From: jangliss Date: Thu, 11 Dec 2003 06:31:04 +0000 Subject: [PATCH] Pick up identities if you're not using default identity on resuming on draft. Looks like somebody had started, but left debugging code everywhere. Please check commits to ensure there is no debug code ;) This is the start of the work for bug #858001 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6265 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/compose.php b/src/compose.php index 2bdacca4..1c2f1b8d 100644 --- a/src/compose.php +++ b/src/compose.php @@ -680,15 +680,24 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $send_to = decodeHeader($orig_header->getAddr_s('to'),false,true); $send_to_cc = decodeHeader($orig_header->getAddr_s('cc'),false,true); $send_to_bcc = decodeHeader($orig_header->getAddr_s('bcc'),false,true); + $send_from = $orig_header->getAddr_s('from'); + $send_from_parts = new AddressStructure(); + $send_from_parts = $orig_header->parseAddress($send_from); + $send_from_add = $send_from_parts->mailbox . '@' . $send_from_parts->host; + $identities = get_identities(); + if (count($identities) > 0) { + foreach($identities as $iddata) { + if ($send_from_add == $iddata['email_address']) { + $identity = $iddata['index']; + break; + } + } + } $subject = decodeHeader($orig_header->subject,false,true); // /* remember the references and in-reply-to headers in case of an reply */ $composeMessage->rfc822_header->more_headers['References'] = $orig_header->references; $composeMessage->rfc822_header->more_headers['In-Reply-To'] = $orig_header->in_reply_to; $body_ary = explode("\n", $body); -/* echo "debug: $identity"; #845290 - $identity='2'; */ - echo "header".decodeHeader($orig_header->getAddr_s('from'),false,true)."
"; - print_r($identities); $cnt = count($body_ary) ; $body = ''; for ($i=0; $i < $cnt; $i++) { -- 2.25.1