note 90029 deleted from function.imap-fetchbody by danbrown

From: Date: Thu, 02 Apr 2009 13:31:09 +0000
Subject: note 90029 deleted from function.imap-fetchbody by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-152753@lists.php.net to get a copy of this message
Note Submitter: phrank ---- 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);

« previous php.notes (#152753) next »