MAPI icon indicating copy to clipboard operation
MAPI copied to clipboard

Body is null even though theres content

Open S-R0 opened this issue 3 years ago • 1 comments

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.

body-issue-image

Screenshot 2021-07-01 at 16 29 07

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?

S-R0 avatar Jul 01 '21 15:07 S-R0

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.

hfig avatar Jul 08 '21 09:07 hfig