note 19138 added to function.imap-fetchbody
| From: | ac at artcenter dot ac | Date: | Sun, 17 Feb 2002 22:24:25 +0000 |
| Subject: | note 19138 added to function.imap-fetchbody | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26717@lists.php.net to get a copy of this message | ||
Lets say your email has this structure:
1 multipart
plain
html
2 x-vcard
and... you can't seem to figure out how to get either plain or HTML part of the multipart
message? have you been going through all the trouble looking for a PHP mime parser? well here is a
simple solution which SHOULD BE documented in this manual. From example above, if you want to get
the plain part of the "multipart" message do this:
$text=imap_fetchbody($mbox,$msg_num,"1.1");
all you do is instead of part number 1, put 1.1 or to get the HTML part put 1.2
EASY!
--
http://www.php.net/manual/en/function.imap-fetchbody.php
http://master.php.net/manage/user-notes.php?action=edit+19138
http://master.php.net/manage/user-notes.php?action=delete+19138
http://master.php.net/manage/user-notes.php?action=reject+19138