You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a somewhat specific issue - the .msg email files I'm parsing sometimes have other .msg files as attachments. As I iterate over the attachments, calling ->copyToStream(...) on the .msg attachments fails (as opposed to calling the same method on, for example, a .pdf attachment, which works normally). Calling ->getData() on the .msg attachment returns a \Hfig\MAPI\Message\Message object. How do I save this .msg attachment (or the underlying Message object) as a physical .msg file on the server?
The text was updated successfully, but these errors were encountered:
So, from memory, a MAPI attachment isn't stored as an attachment, it's stored as another sub-document in the OLE compound document. Other types of OLE compound documents - .DOC, .XLS etc - can theoretically also be stored this way.
This library doesn't implement writing of an OLE compound document. You have a couple of options -
You can convert it to RFC822 Mime and save it as an .eml file
The Message class is provided with an OLE root element in the $obj member. Unfortunately, the $obj member is protected, so your implementation will require a fork.
I have a somewhat specific issue - the .msg email files I'm parsing sometimes have other .msg files as attachments. As I iterate over the attachments, calling
->copyToStream(...)
on the .msg attachments fails (as opposed to calling the same method on, for example, a .pdf attachment, which works normally). Calling->getData()
on the .msg attachment returns a\Hfig\MAPI\Message\Message
object. How do I save this .msg attachment (or the underlying Message object) as a physical .msg file on the server?The text was updated successfully, but these errors were encountered: