note 90029 added to function.imap-fetchbody

From: Date: Thu, 02 Apr 2009 11:43:09 +0000
Subject: note 90029 added to function.imap-fetchbody
Groups: php.notes 
Request: Send a blank email to php-notes+get-152745@lists.php.net to get a copy of this message
If you want to fetch the complete message, you may set $section = null. @ the comment of atamido at gmail dot remove dot com If you set $section = "1" you receive the first part of a multipart message or the complete body of a "non-multipart" message, e.g. text/plain. If you set $section = "1.1" you receive the first part of a nested multipart message. And so on. As far as I could find out, there is no value for $section which makes imap_fetchbody return the complete body of a multipart message. The following code is a workaround: $message = imap_fetchbody($stream, $msgno, null); $body = substr($message, strpos($message, "\r\n\r\n") + 4); ---- Server IP: 217.160.72.57 Probable Submitter: 92.73.163.28 ---- Manual Page -- http://www.php.net/manual/en/function.imap-fetchbody.php Edit -- https://master.php.net/note/edit/90029 Del: integrated -- https://master.php.net/note/delete/90029/integrated Del: useless -- https://master.php.net/note/delete/90029/useless Del: bad code -- https://master.php.net/note/delete/90029/bad+code Del: spam -- https://master.php.net/note/delete/90029/spam Del: non-english -- https://master.php.net/note/delete/90029/non-english Del: in docs -- https://master.php.net/note/delete/90029/in+docs Del: other reasons-- https://master.php.net/note/delete/90029 Reject -- https://master.php.net/note/reject/90029 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152745) next »