@@ -648,16 +648,16 @@ |
||
| 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 | } |
@@ -649,13 +649,15 @@ |
||
| 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 | 651 | if (empty($props[PR_MESSAGE_DELIVERY_TIME])) { |
| 652 | - if (!empty($props[PR_CLIENT_SUBMIT_TIME])) |
|
| 653 | - mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $props[PR_CLIENT_SUBMIT_TIME]]); |
|
| 652 | + if (!empty($props[PR_CLIENT_SUBMIT_TIME])) { |
|
| 653 | + mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $props[PR_CLIENT_SUBMIT_TIME]]); |
|
| 654 | + } |
|
| 654 | 655 | else { |
| 655 | 656 | if (preg_match('/^Date:\s*(.+)$/mi', $attachmentStream, $matches)) { |
| 656 | 657 | $deliverytime = strtotime(trim($matches[1])); |
| 657 | - if ($deliverytime) |
|
| 658 | - mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $deliverytime]); |
|
| 658 | + if ($deliverytime) { |
|
| 659 | + mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $deliverytime]); |
|
| 660 | + } |
|
| 659 | 661 | |
| 660 | 662 | } |
| 661 | 663 | } |