/** * Method used to get the encoded content of a specific message * attachment. * * @access public * @param string $message The full content of the message * @param string $filename The filename to look for * @param string $cid The content-id to look for, if any * @return string The full encoded content of the attachment */ function getAttachment($message, $filename, $cid = FALSE) { $parts = array(); $output = Mime_Helper::decode($message, true); $details = Mime_Helper::_getAttachmentDetails($output, TRUE, $filename, $cid); if (count($details) == 1) { return array($details[0]['filetype'], $details[0]['blob']); } else { return array(); } }