summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc6
-rw-r--r--program/steps/mail/sendmail.inc6
2 files changed, 9 insertions, 3 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 52a396b0b..fa1ea9533 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -158,9 +158,9 @@ if (!empty($msg_uid))
{
if($MESSAGE->headers->in_reply_to)
{
- // TODO: how to get reply_uid/forward_uid value, maybe we must set X-Reply-UID/X-Forward-UID
- // $_SESSION['compose']['reply_uid'] = ?
- // $_SESSION['compose']['forward_uid'] = ?
+ // get reply_uid/forward_uid to flag the original message when sending
+ $_SESSION['compose']['reply_uid'] = $MESSAGE->headers->others['x-reply-uid'];
+ $_SESSION['compose']['forward_uid'] = $MESSAGE->headers->others['x-forward-uid'];
$_SESSION['compose']['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>';
}
$_SESSION['compose']['references'] = $MESSAGE->headers->references;
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 134664b85..abd4209c3 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -314,6 +314,12 @@ else if (!empty($identity_arr['reply-to']))
if (!empty($_SESSION['compose']['reply_msgid']))
$headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid'];
+// remember reply/forward UIDs in special headers
+if (!empty($_SESSION['compose']['reply_uid']) && $savedraft)
+ $headers['X-Reply-UID'] = $_SESSION['compose']['reply_uid'];
+else if (!empty($_SESSION['compose']['forward_uid']) && $savedraft)
+ $headers['X-Forward-UID'] = $_SESSION['compose']['forward_uid'];
+
if (!empty($_SESSION['compose']['references']))
$headers['References'] = $_SESSION['compose']['references'];