For reference, I use the same m4007 mail as found in this project.
The first part is a message/rfc822 part. This library doesn't parse the part, as issued in #265, so I use the following code to force subparsing:
$rfc822part = MIMEMessage::from($message->getContent(),true);
Now that I can access the information of this part, I check both $rfc822part->isMultiPart() and $rfc822part->getChildParts(). The former returns true. However, the latter returns [], so no child parts.
I investigated this problem, and I found out it had something to do with the boundary. When I used the following code to change the Content-Type header and forced reparsing, the child parts where also found:
$rfc822part->setRawHeader(HeaderConsts::CONTENT_TYPE,'multipart/digest; boundary="foo "');
$rfc822part = MIMEMessage::from($rfc822part->getStream()->getContents(),true);
And because the previous code changes the \n in the header to \r\n, the following code where this doesn't happen also works:
$rfc822part = MIMEMessage::from(str_replace('boundary="foo"','boundary="foo "',$rfc822part->getStream()->getContents()),true);
For reference, I use the same
m4007mail as found in this project.The first part is a
message/rfc822part. This library doesn't parse the part, as issued in #265, so I use the following code to force subparsing:Now that I can access the information of this part, I check both
$rfc822part->isMultiPart()and$rfc822part->getChildParts(). The former returnstrue. However, the latter returns[], so no child parts.I investigated this problem, and I found out it had something to do with the boundary. When I used the following code to change the
Content-Typeheader and forced reparsing, the child parts where also found:And because the previous code changes the
\nin the header to\r\n, the following code where this doesn't happen also works: