I have written a PHP (v5.1) app to parse a bunch of MIME files.  It works for 
the vast majority, but sometimes I get this error:

mailparse_msg_extract_part_file(): mbstring doesn't know how to decode plain 
transfer encoding! 

It appears to be when messages have Content-Type: text/plain; charset=us-ascii 
or Content-Transfer-Encoding: plain or a combination of the two.  I've searched 
on the error message and only found a url that times out.

Does anyone have any experience with this?  The code in question is this (it's 
part of a function that gets the email body):

foreach ($this->_sectiondata as $index => $data)
{
        $contdisp = $this->_getHeaderData($index, 'content-disposition');
        if ($contdisp == "" && $data['content-type'] != 'multipart/mixed')
        {
                $sec = mailparse_msg_get_part($this->_mimehandle, $index);
                ob_start();
                /* extract the part from the message file and dump it to the 
output buffer */
                mailparse_msg_extract_part_file($sec, $this->_filename);
                $contents = ob_get_contents();
                ob_end_clean();
                $this->_body = $contents;
        }
}

Thanks!



Regards,

Bruce

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to