diff --git a/src/app/DataMigrator/EWS/Note.php b/src/app/DataMigrator/EWS/Note.php index 021260f9..dc839fcc 100644 --- a/src/app/DataMigrator/EWS/Note.php +++ b/src/app/DataMigrator/EWS/Note.php @@ -1,41 +1,56 @@ getMimeContent()); + $flags = []; + if ($item->getIsRead()) { + $flags[] = 'SEEN'; + } + + $internaldate = null; + if ($internaldate = $item->getDateTimeReceived()) { + $internaldate = (new \DateTime($internaldate))->format('d-M-Y H:i:s O'); + } + + $targetItem->data = [ + 'flags' => $flags, + 'internaldate' => $internaldate, + ]; + return $email; } }