note 35407 added to function.imap-fetchbody
| From: | asfd at aasdfa dot com | Date: | Sat, 30 Aug 2003 07:48:56 +0000 |
| Subject: | note 35407 added to function.imap-fetchbody | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55327@lists.php.net to get a copy of this message | ||
PLEASE DOCUMENT THIS POST AND SAVE US SOME TIME! :)
ac at artcenter dot ac
17-Feb-2002 04:24
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!
----
Manual Page -- http://www.php.net/manual/en/function.imap-fetchbody.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35407
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35407&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35407&report=yes