Hi All, There's a bug in pop3.inc when parsing the headers where it increments a array counter and then inserts the value into the $lines array, such that this arrays index starts at 1 (not 0). However just alittle further down when it reads back the array it starts at 0 and reads array length number of lines/headers. ie. for ($i=0;$i<$numlines;$i++) this causes it to always miss the last header. This is often of no consequence but if the last header was the "from: " then things really don't work so well.
This can be fixed by merely moving the $c++; down below the $lines[$c]=$line; as shown in the diff below. --- pop3.inc~ 2005-01-08 15:29:35.000000000 -0500 +++ pop3.inc 2005-11-09 05:00:51.000000000 -0500 @@ -592,8 +592,8 @@ if (strlen($line)>2){ if (ord($line[0]) <= 32) $lines[$c] .= (empty($lines[$c])?"":"\n").trim($line); else{ - $c++; $lines[$c]=$line; + $c++; } } }while($line[0]!="."); Thanks for keeping Ilohamail alive! Harvey ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Ilohamail-devel mailing list Ilohamail-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ilohamail-devel