|
@@ -648,16 +648,16 @@ |
|
|
block discarded – undo |
|
648
|
648
|
// Manually set PR_MESSAGE_DELIVERY_TIME to sent time, since mapi_inetmapi_imtomapi does not set delivery-time |
|
649
|
649
|
// Either use PR_CLIENT_SUBMIT_TIME or extract date from EML and set PR_MESSAGE_DELIVERY_TIME |
|
650
|
650
|
$props = mapi_getprops($newMessage, [PR_CLIENT_SUBMIT_TIME, PR_MESSAGE_DELIVERY_TIME]); |
|
651
|
|
- if (empty($props[PR_MESSAGE_DELIVERY_TIME])) { |
|
|
651
|
+ if (empty($props[PR_MESSAGE_DELIVERY_TIME])) { |
|
652
|
652
|
if (!empty($props[PR_CLIENT_SUBMIT_TIME])) |
|
653
|
|
- mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $props[PR_CLIENT_SUBMIT_TIME]]); |
|
|
653
|
+ mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $props[PR_CLIENT_SUBMIT_TIME]]); |
|
654
|
654
|
else { |
|
655
|
655
|
if (preg_match('/^Date:\s*(.+)$/mi', $attachmentStream, $matches)) { |
|
656
|
|
- $deliverytime = strtotime(trim($matches[1])); |
|
657
|
|
- if ($deliverytime) |
|
|
656
|
+ $deliverytime = strtotime(trim($matches[1])); |
|
|
657
|
+ if ($deliverytime) |
|
658
|
658
|
mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $deliverytime]); |
|
659
|
659
|
|
|
660
|
|
- } |
|
|
660
|
+ } |
|
661
|
661
|
} |
|
662
|
662
|
mapi_message_savechanges($newMessage); |
|
663
|
663
|
} |
Please login to merge, or discard this patch.