note 19578 added to function.imap-fetchbody
| From: | sarachaga at yahoo dot com | Date: | Mon, 04 Mar 2002 16:23:38 +0000 |
| Subject: | note 19578 added to function.imap-fetchbody | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27322@lists.php.net to get a copy of this message | ||
For those guys trying to extract a message/rfc822 parts correctly here is a hint:
As you may note, if you recurse over the structure object returned by imap_fetchstructure, when you
reach the message/rfc822 you find that the message itself counts as a part too, so an attachment in
that message should be 2.1.2 (the .1. is the whole rfc822 msg), but if you use that part number in
imap_fetchbody you get nothing.
What i did is: my recursing function checks if the part/subtype of a particular part is
message/rfc822, and only in that case i do not concatenate the .1 to the part number, because as far
as i know, this only happens with this kind of message. And for all the other parts (non rfc822) it
concats the dot-partnumber.
--
http://www.php.net/manual/en/function.imap-fetchbody.php
http://master.php.net/manage/user-notes.php?action=edit+19578
http://master.php.net/manage/user-notes.php?action=delete+19578
http://master.php.net/manage/user-notes.php?action=reject+19578