PHP code example of sourcepot / php-ole-msg-parser
1. Go to this page and download the library: Download sourcepot/php-ole-msg-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sourcepot / php-ole-msg-parser example snippets
$parser = new \Opt\OLE\MsgParser('path/to/message.msg');
$message = $parser->parse();
$headers = $message->headers;
$transportLayerRawHeaders=$headers['TRANSPORT_MESSAGE_HEADERS'];
$body = $message->body;
foreach ($message->attachments as $attachment){
file_put_contents($attachment['filename'], $attachment['data']);
}