PHP Classes

Some Problems with the mime parse class

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Some Problems with the mime parse class  >  (Un) Subscribe thread alerts  
Subject:Some Problems with the mime parse class
Summary:Some Problems with the mime parse class
Messages:4
Author:Tom
Date:2007-04-02 09:49:18
Update:2007-04-02 17:53:57
 

  1. Some Problems with the mime parse class   Reply   Report abuse  
Picture of Tom Tom - 2007-04-02 09:49:20
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) "myadress@xyz.de"
["delivered-to:"]=>
string(16) "myadress@xyz.de"
["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) "<4610CA77.5010704@xyz.de>"
["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) "myname@xyz.de"
["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 <myadress@mydomain.de>

i get decoded

["from:"]=>
string(27) "my Name "

If i touch the raw file like this:

From: <myadress@mydomain.de>

i get decoded

["from:"]=>
string(27) ""

If i touch the raw file like this:

From: myadress@mydomain.de

i get decoded

["from:"]=>
string(27) "myadress@mydomain.de"


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

  2. Re: Some Problems with the mime parse class   Reply   Report abuse  
Picture of Tom Tom - 2007-04-02 10:40:23 - In reply to message 1 from Tom
Another Information:

Your example file don't work too:

Message 1:
array(2) {
["Headers"]=>
array(11) {
["return-path:"]=>
string(16) ""
["to:"]=>
string(33) "Manuel Lemos "
["subject:"]=>
string(79) "Testing Manuel Lemos' MIME E-mail composing and sending PHP class: HTML message"
["from:"]=>
string(23) "mlemos "
["reply-to:"]=>
string(23) "mlemos "
["sender:"]=>
string(14) "mlemos@acm.org"
["x-mailer:"]=>
string(62) "http://www.phpclasses.org/mimemessage $Revision: 1.63 $ (mail)"
["mime-version:"]=>
string(3) "1.0"
["content-type:"]=>
string(60) "multipart/mixed; boundary="652b8c4dcb00cdcdda1e16af36781caf""
["message-id:"]=>
string(36) "<20050430192829.0489.mlemos@acm.org>"
["date:"]=>
string(31) "Sat, 30 Apr 2005 19:28:29 -0300"
}
----cutted here-----

The "From" Value and other isn't set correct


Im using PHP 5.2.0

  3. Re: Some Problems with the mime parse class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-04-02 13:52:22 - In reply to message 1 from Tom
You are seeing that in a HTML page but the characters are not escaped. Consequently, the characters between < and > are omitted because they do not mean anything in HTML.

Try seeing the source of the HTML page to view all the characters.

  4. Re: Some Problems with the mime parse class   Reply   Report abuse  
Picture of Tom Tom - 2007-04-02 17:53:57 - In reply to message 3 from Manuel Lemos
Thanx Manuel ! Problem solved. HtmlSpecialChars and all is okay.

Greetings Tom