I'm trying to read messages using php imap functions. I have emails that
were sent as simple text but the line lengths are more than x characters.

The orginal lines look like...

F552322518200    29  000000002400600000000001
440020000300003000000000000000000
F552322518200    29  000000001800700000000002
440020000300003000000000000000000
F552322518200    29  000000003801100000000003
320020001700017000000000000000000

and the messages look like....

F552921885200    19  000000003001500000001001
290020002700021000000000000000000
F552921885200    29  000000001800500000000002
440020000200002000000000000000000
F552921885200    19  000000004001200000000003
290020002000020000000000000000000

when I "read" them using the following code....

echo "<p><h1>Headers in INBOX</h1>\n";
$headers = imap_headers ($mbox);

if ($headers == false)
{
    echo "Call failed<br>\n";
}
else
{
   while (list ($key,$val) = each ($headers))
   {
       echo $key. "-". $val."<br>\n";
       $msg_struct = imap_fetchstructure($mbox, $key+1);

       if( $msg_struct->type == TYPETEXT )
       {
         $email_dump = imap_body( $mbox, $key+1 );
         echo $email_dump. "<br>";
       }
   }
}

What must I do to ensure the message looks like the orginal version (long
lines) rather than the second version? Is there some method to modify the
line length of the emails? Convert crlf characters? encoding method?

Thanks,
Jeff.

--
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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

Reply via email to