MAPI
MAPI copied to clipboard
Body is null even though theres content
I've come across an issue where the body is null after parsing a message, even though there is content. This results in methods like getBodyHTML
throwing an error.
The above image is an example, i'm having the issue on another email but its confidential.
I cannot upload an .msg file for you to test with, if you could provide an email address to send the msg file to?
hmm. If you never sent the email via SMTP, Outlook might have done something like save it as RTF not HTML. This library doesn't handle converting RTF (with one exception: it will attempt to locate an HTML-encapsulated-in-RTF body and extract it). I didn't think this scenario was likely anymore.
If that is the case, you can add it using the jstewmc/rtf
library which can convert simple RTF to HTML or PhpWord
for more complex needs. PRs are gladly accepted.