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