diff options
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/compose.inc | 4 | ||||
-rw-r--r-- | program/steps/mail/search.inc | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index d13f71aa2..5131010af 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -86,9 +86,7 @@ if (!empty($msg_uid)) { $_SESSION['compose']['reply_uid'] = $msg_uid; $_SESSION['compose']['reply_msgid'] = $MESSAGE['headers']->messageID; - $_SESSION['compose']['references'] = $MESSAGE['headers']->reference; - $_SESSION['compose']['references'] .= !empty($MESSAGE['headers']->reference) ? ' ' : ''; - $_SESSION['compose']['references'] .= $MESSAGE['headers']->messageID; + $_SESSION['compose']['references'] = trim($MESSAGE['headers']->references . " " . $MESSAGE['headers']->messageID); if (!empty($_GET['_all'])) $MESSAGE['reply_all'] = 1; diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc index a3f6dda66..5ed6627ef 100644 --- a/program/steps/mail/search.inc +++ b/program/steps/mail/search.inc @@ -64,7 +64,8 @@ else if (preg_match("/^body:/i", $str)) // search in subject and sender by default else { - $subject = array("HEADER SUBJECT", "HEADER FROM"); + $from = ($mbox == $CONFIG['sent_mbox'] || $mbox == $CONFIG['drafts_mbox']) ? "TO" : "FROM"; + $subject = array("HEADER SUBJECT", "HEADER $from"); $search = trim($str); } |