Mail_MIME with .gz format attachments
| From: | Rob Newman | Date: | Fri, 01 Oct 2004 16:52:46 +0000 |
| Subject: | Mail_MIME with .gz format attachments | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14716@lists.php.net to get a copy of this message | ||
Hi Group,
I am using the Mail_Mime package to decode emails. Where do gzipped (.gz)
attachments show up in the decoded array values? I tried decoding an email
which I know has two .gz files attached and could not see anywhere in the
decoded output where they were. If I look at the raw message I can see the
attachments, but it appears that Mail_MIME cannot find them.
Here is what the raw code looks like where the files are:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--Apple-Mail-13--440325934
Content-Transfer-Encoding: base64
Content-Type: application/x-gzip;
x-unix-mode=0644;
name="A04A-BHN.ps.gz"
Content-Disposition: attachment;
filename=A04A-BHN.ps.gz
H4sICPE6U0EAA0EwNEEtQkhOLnBzAOxcbXPbRpL+LPyKWd2qYldEDsE3vWxd1cmyHGvXsR1LdrKb
ywcQGJKIQAAGQIm0yv/9nu6eAUFIzirZ3K53yymbBBrTPd09/Q46e394fdE5ibKJ6Qy6PXX2+uIZ
XXh7e6eFCaqsOFaXV+o0SK+DUn0fRzNT4dkzgr8xQaIu44VRb0tTKIAv4yoxx1iWRtmN6kZxmfvd
---- LOADS OF CODE THAT IS THE FILES ----
fLWPPfpp/8XXDl/tc5RhenmJ//FPHy/4p2n/ANKX6dtLuD7+6zLN148Tx/+cz5/+9g9/+vPPQzQu
KZDTwv/67W/+3rIK0f0//s9pfPl3v/nz3/13bECJmp68/n/689/96UM4//3Pb2//5J/8799+8/uP
zX/7+Y+/+/ivf/Gv/uXb/wt06O9Q5gEiAA==
--Apple-Mail-13--440325934--
Here is the decoded output from Mail_MIME:
++++++++++++++++++++++++++++++++++++++++++
stdClass Object
(
[headers] => Array
(
[from sender@domain.com thu sep 23 15] => 28:04 2004
[received] => Array
(
[0] => from mailbox1.domain.com
[1] => from mailbox2.domain.com
[2] => from mailbox3.domain.com
)
[received-spf] => pass (mailbox1.domain.com: domain of
sender@domain.com designates ***.***.***.** as permitted sender)
receiver=mailbox1.ucsd.edu; client_ip=***.***.***.**;
envelope-from=sender@domain.com;
[mime-version] => 1.0 (Apple Message framework v619)
[to] => Receiver
[message-id] =>
[content-type] => multipart/mixed;
boundary=Apple-Mail-13--440325934
[subject] => subject
[from] => Sender
[date] => Thu, 23 Sep 2004 15:27:54 -0700
[x-mailer] => Apple Mail (2.619)
[x-mailscanner] => PASSED (v1.2.8 96830 i8NMRu7e028087
mailbox1.domain.com)
)
[ctype_primary] => multipart
[ctype_secondary] => mixed
[ctype_parameters] => Array
(
[boundary] => Apple-Mail-13--440325934
)
[parts] => Array
(
[0] => stdClass Object
(
[headers] => Array
(
[content-transfer-encoding] => 7bit
[content-type] => text/plain; charset=US-ASCII;
format=flowed
)
[ctype_primary] => text
[ctype_secondary] => plain
[ctype_parameters] => Array
(
[charset] => US-ASCII
[format] => flowed
)
[body] => Text message
)
)
)
++++++++++++++++++++++++++++++++++++++++++
There is no sign of the attachments....
I am assuming I have to somehow decode this line:
[ctype_parameters] => Array
(
[boundary] => Apple-Mail-13--440325934
)
Has anyone run into this before or have any solutions?
All help appreciated. Thanks in advance.
- Rob