
Alex V - 2011-09-23 14:06:44
Is there an easy way to get the body of the message? I need to get the HTML content when available, plain text otherwise.
So far I do it this way for HTML:
$parser = new Core_MimeParser();
$parser->Decode(array('Data' => $msgSource), $decoded);
print_r($decoded[0]['Parts'][0]['Parts'][1]['Body']);
but I guess [0]['Parts'][0]['Parts'][1]['Body'] is not always there for plain text message?