PHP Classes

Encoded Headers Question

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Encoded Headers Question  >  (Un) Subscribe thread alerts  
Subject:Encoded Headers Question
Summary:In witch cases i have encoded headers ?
Messages:3
Author:Tom
Date:2007-04-04 12:44:56
Update:2007-04-05 08:14:17
 

  1. Encoded Headers Question   Reply   Report abuse  
Picture of Tom Tom - 2007-04-04 12:44:56
Are encoded Headers only Outlook CID specific related ?

Like this:
---cut---
[1]=>
array(7) {
["Headers"]=>
array(3) {
["content-type:"]=>
string(71) "image/jpeg; name="=?iso-8859-1?Q?Hintergrund_f=FCr_Sch=F6nwetter.jpg?=""
["content-transfer-encoding:"]=>
string(6) "base64"
["content-id:"]=>
string(44) "<001101c776b4$1a67ce70$fe78a8c0@linuxserver>"
}
["Parts"]=>
array(0) {
}
["DecodedHeaders"]=>
array(1) {
["content-type:"]=>
array(1) {
[0]=>
array(1) {
[0]=>
array(2) {
["Value"]=>
string(50) "image/jpeg; name="Hintergrund für Schönwetter.jpg""
["Encoding"]=>
string(10) "ISO-8859-1"
}
}
}
}
["FileName"]=>
string(52) "=?iso-8859-1?Q?Hintergrund_f=FCr_Sch=F6nwetter.jpg?="
["BodyFile"]=>
string(52) "/srv/www/xx.yy.de/htdocs/data/mail/53/tmp/3"
["BodyPart"]=>
int(3)
["BodyLength"]=>
int(5675)
---cut---





  2. Re: Encoded Headers Question   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-04-04 17:44:27 - In reply to message 1 from Tom
No, encoded headers are pretty standard. Mailing programs should encode headers when there are non-ASCII characters in the header values.

The e-mail standards only allow the use of ASCII characters in the encoded messages, although some systems support 8 bit decoded messages.

  3. Re: Encoded Headers Question   Reply   Report abuse  
Picture of Tom Tom - 2007-04-05 08:14:17 - In reply to message 2 from Manuel Lemos
Ok, i decode Headers if i found a ?Q? (quoted-printable) or ?B? (base64) in the string.

I have now finished my routine with your class. It pulls (via pop3 class)a mailbox in a loop with one pop3 connection and save alle Mail (each Mail alternative) to Database. Attachments where saved to.

I've tested much different sending Mailclients in much combination of mailcontent and it works good.
I hope, that my recursive getparts routine (Parsing mime parsers output and take action with the parts) is korrekt for use.

If any have interessing in these routines, write me an email: tg [a.t]netappz.de