note 35692 deleted from function.imap-body by didou

From: Date: Mon, 15 Jan 2007 00:34:23 +0000
Subject: note 35692 deleted from function.imap-body by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121692@lists.php.net to get a copy of this message
Note Submitter: sito ---- 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. <?php // 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.

« previous php.notes (#121692) next »