[Mail_mimeDecode] Does it work? Not for me... :(
| From: | Tobias Schlitt | Date: | Thu, 21 Nov 2002 12:33:20 +0000 |
| Subject: | [Mail_mimeDecode] Does it work? Not for me... :( | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2788@lists.php.net to get a copy of this message | ||
Hi everybody!
I tried questioning my local POP3-Server with PEAR/Net_POP3. Works
really fine! Cool!
Next Step was to look, what happens, if a message is in MIME format. I
sent myself some message including an image as file-attachment. Then i
instanciated an object from Mail_mimeDecode and tried decoding the
MIME-Message i got. The "struct"-Result i got from it is printed out
here (shortened):
<snip>
stdClass Object
(
[headers] => Array
(
[] => Array
(
[0] => tobias@schlitt.info>
[1] => 000
[2] => MX delivery to dot.com2000@gmx.de
[3] => rray
[4] => 00b301c29156$785c8720$0200a8c0@dotxpws>
[5] => Tobias Schlitt"
[6] => Tobias Schlitt"
[7] => dot.com2000@gmx.de>
[8] => ttachment added
[9] => .0
[10] => ultipart/mixed;
boundary="----=_NextPart_000_00B0_01C2915E.D9B471B0"
[11] =>
[12] => ormal
[13] => icrosoft Outlook Express 6.00.2800.1123
[14] => roduced By Microsoft MimeOLE
V6.00.2800.1123
[15] => (no virus found)
[16] => OThis is a multi-part message in MIME
format.
)
[thu, 21 nov 2002 13] => 06:48 +0100
)
[ctype_primary] => text
[ctype_secondary] => plain
[body] => ------=_NextPart_000_00B0_01C2915E.D9B471B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hier ist ein Attachment dran....
------=_NextPart_000_00B0_01C2915E.D9B471B0
Content-Type: image/jpeg;
name="rand_1.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="rand_1.jpg"
/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQ
YGBcU
FhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCg
oKCgo
[...]BPaVFwTnx2ovUCMqW6hxBeQUIjsoI+Fz4lJFgRxYfTawGJjp8VM2wsz0KntxqsqPKi
vaJEBtpaWV
EJVpeQbcEG1ibjVxtfExcDUIJ//Z
------=_NextPart_000_00B0_01C2915E.D9B471B0--
)
Can anyone tell me, what went wrong?
Thanks a lot!
P.S. The Documentation inside the PEAR website for this classes is
wrong in some parts. Would be fine if someone of the website team could
contact me for further details!
--
<?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2*
5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2*
23,105,11*10,2*51,111);'); function f($a){print
eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ?>