[eluser]steelaz[/eluser]
I just checked and you are right, fetchMessage() fails with bounced emails. It looks like it fails because content-type part of header is missing in bounced email. To fix it, I added default conent-type as "text/plain".
Go to parseStructure() function and below
Code:
if (!$headers) {
list ($headers, $data) = explode("\r\n\r\n", $data, 2);
$headers = self::parseHeaders($headers);
}
add
Code:
if (!isset($headers['content-type']['value']))
$headers['content-type']['value'] = 'text/plain';
This worked for me, but I'm submitting bug report to Flourish bug tracker and will see what they'll come up with.