imap mime mail decode
| From: | jef peeraer | Date: | Sun, 18 Sep 2005 12:12:59 +0000 |
| Subject: | imap mime mail decode | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-21024@lists.php.net to get a copy of this message | ||
i have a simpel mail message with 1 attachment, but i can decode it with the mime_decode methos. the mail message looks as follows ( skipped the header )
User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: .....
Subject: test
Content-Type: multipart/mixed;
boundary="------------060409010605040102060106"
X-AntiVirus: checked by AntiVir Milter 1.0.7; AVE 6.32.0.3; VDF 6.32.0.15
Status: RO
X-Status:
X-Keywords:
X-UID: 37
This is a multi-part message in MIME format.
--------------060409010605040102060106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
test
--------------060409010605040102060106
Content-Type: text/plain;
name="test.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="test.txt"
dit is een test
--------------060409010605040102060106--
it parses like this :
structure ->stdClass Object
(
[headers] => Array
(
[] => Array
(
[0] => his is a multi-part message in MIME format.
[1] => -------------060409010605040102060106
)
[content-type] => text/plain; charset=ISO-8859-1; format=flowed
[content-transfer-encoding] => 7bit
)
[ctype_primary] => text
[ctype_secondary] => plain
[ctype_parameters] => Array
(
[charset] => ISO-8859-1
[format] => flowed
)
[body] => test--------------060409010605040102060106 Content-Type: text/plain; name="test.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test.txt" dit is een test --------------060409010605040102060106-- ) jef peeraer