Hi Manuel,
im using your class, but the class have some bugs parsing all Values !
I get some messages via pop3 and the class get not return-path,from (only the name, not the email adress) etc..
Your File example works great, my raw file in the courier mailbox is same like your file. But when i get it via pop3 not alle Values are in structure.
Here the output:
array(5) {
["Headers"]=>
array(13) {
["return-path:"]=>
string(15) ""
["x-original-to:"]=>
string(16) "
[email protected]"
["delivered-to:"]=>
string(16) "
[email protected]"
["received:"]=>
string(186) "from [10.15.10.103] (xyz-tg.ul.xyz.de [x.y.z.z]) by xyz.serverkompetenz.net (Postfix) with ESMTP id 7EF2E2F431E for ; Mon, 2 Apr 2007 11:19:43 +0200 (CEST)"
["message-id:"]=>
string(29) "<
[email protected]>"
["date:"]=>
string(31) "Mon, 02 Apr 2007 11:18:47 +0200"
["from:"]=>
string(27) "my Name "
["user-agent:"]=>
string(39) "Thunderbird 1.5.0.10 (Windows/20070221)"
["mime-version:"]=>
string(3) "1.0"
["to:"]=>
string(16) "
[email protected]"
["subject:"]=>
string(4) "test"
["content-type:"]=>
string(46) "text/plain; charset=ISO-8859-15; format=flowed"
["content-transfer-encoding:"]=>
string(4) "7bit"
}
["Parts"]=>
array(0) {
}
["BodyFile"]=>
string(52) "/srv/www/xyz/htdocs/data/mail/53/tmp/1"
["BodyPart"]=>
int(1)
["BodyLength"]=>
int(6)
}
I have made some tests:
In my raw mailboxfile on server is
From: My Name <
[email protected]>
i get decoded
["from:"]=>
string(27) "my Name "
If i touch the raw file like this:
From: <
[email protected]>
i get decoded
["from:"]=>
string(27) ""
If i touch the raw file like this:
From:
[email protected]
i get decoded
["from:"]=>
string(27) "
[email protected]"
Have you any hints about this bugs ?
i used this Verision:
mime_parser.php,v 1.26 2007/02/16 18:43:45 mlemos Exp $
Greets Tom