I had trouble with messages, that only contained an attachment in their body. The value for $partNumberwas not set in fetchStructure() thus imap_fetchbody() returned null. The edited line fixes the issue and should, according to my tests, not have any side effects on messages with more content in the body.
I had trouble with messages, that only contained an attachment in their body. The value for
$partNumber
was not set infetchStructure()
thusimap_fetchbody()
returnednull
. The edited line fixes the issue and should, according to my tests, not have any side effects on messages with more content in the body.