note 35692 added to function.imap-body

From: Date: Thu, 11 Sep 2003 10:09:57 +0000
Subject: note 35692 added to function.imap-body
Groups: php.notes 
Request: Send a blank email to php-notes+get-56059@lists.php.net to get a copy of this message
Usually, not multipart or 'zero-parts' messages are displayed with imap_body, but you may have a multipart message with no parts. For this type, displaying with imap_body, you may get unwanted data(like 'this is a MIME...' and boundary string), so a better solution is use imap_fetchbody. // Type 1 is 'multipart' if(($struct->type==1) && (sizeOf($struct->parts)==0)) { echo(imap_fetchbody($mailConn,$msg,"1")); } Where $struct is the object returned by imap_fetchstructure. ---- Manual Page -- http://www.php.net/manual/en/function.imap-body.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35692 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35692&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35692&report=yes

« previous php.notes (#56059) next »