@@ -649,14 +649,16 @@ |
||
| 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 | $dateStr = trim($matches[1]); |
| 657 | 658 | $deliverytime = strtotime($dateStr); |
| 658 | - if ($deliverytime) |
|
| 659 | - mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $deliverytime]); |
|
| 659 | + if ($deliverytime) { |
|
| 660 | + mapi_setprops($newMessage, [PR_MESSAGE_DELIVERY_TIME => $deliverytime]); |
|
| 661 | + } |
|
| 660 | 662 | |
| 661 | 663 | } |
| 662 | 664 | } |