Make sure drafts are sent with the current date and not that of its previous 'Save...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 12 May 2021 05:33:01 +0000 (05:33 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 12 May 2021 05:33:01 +0000 (05:33 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14922 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 03993ce7e6f1e292646693e4aec79121ef96b583..1c04a0234d49c5c8aaf2e6db78d92a63163d01c3 100644 (file)
@@ -1729,6 +1729,11 @@ function deliverMessage(&$composeMessage, $draft=false) {
 
     $rfc822_header = $composeMessage->rfc822_header;
 
+    // clear Date header so drafts don't end up with a stale date
+    // (does this cause issues with some other scenario where a
+    // message with an existing date header should be preserved??)
+    unset($rfc822_header->date);
+
     $abook = addressbook_init(false, true);
     $rfc822_header->to = $rfc822_header->parseAddress($send_to,true, array(), '', $domain, array(&$abook,'lookup'));
     $rfc822_header->cc = $rfc822_header->parseAddress($send_to_cc,true,array(), '',$domain, array(&$abook,'lookup'));