PHP Classes

Parsing 7bit encoded

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Parsing 7bit encoded  >  (Un) Subscribe thread alerts  
Subject:Parsing 7bit encoded
Summary:Problems with mime_parser.php
Messages:3
Author:Roland Liebl
Date:2007-01-16 21:07:06
Update:2007-01-17 00:32:51
 

  1. Parsing 7bit encoded   Reply   Report abuse  
Picture of Roland Liebl Roland Liebl - 2007-01-16 21:07:06
#1-

Greate work !!!

#2-

7 bit / 8 bit decoding fails if there is source file contains "7 bit" instead of "7bit" ... same with 8 bit.

This one is easily fixed by modifying ...

case 'content-transfer-encoding:':
switch($this->headers['Encoding']=str_replace(" ","",strtolower(trim($part['Value']))))

to

case 'content-transfer-encoding:':
switch($this->headers['Encoding']=trim($part['Value'])

#3-

Header Field Value "From" and "To" is not returned for the following header:
From: <mailer-daemon@roland-liebl.de>
To: <roland@roland-liebl.de>

If I edit the source file and add manually quotation marks it works:

From: <"mailer-daemon@roland-liebl.de">
To: <"roland@roland-liebl.de">

I can't find where to fix it!

Thanks,

Roland




  2. Re: Parsing 7bit encoded   Reply   Report abuse  
Picture of Roland Liebl Roland Liebl - 2007-01-16 22:31:07 - In reply to message 1 from Roland Liebl
#3 - It was my mistake ... It returns values of from an to field correct. I just was to silly to notice that the html tags including the sender/recipient prevents to show the value in html when dumping the array $decoded.

Sorry,

Roland

  3. Re: Parsing 7bit encoded   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-01-17 00:32:51 - In reply to message 1 from Roland Liebl
"7 bit" and "8 bit" are incorrect encoding types.

I have changed the class to tolerate errors of incorrect or unsupported encoding types.