Grep the plan/text part from mail

From: Date: Thu, 24 Aug 2000 08:08:13 +0000
Subject: Grep the plan/text part from mail
Groups: php.general 
Request: Send a blank email to php-general+get-13328@lists.php.net to get a copy of this message
Dear all, I would like to grep the plain/text part of a MIME mail to display. How can I do it? I try the following but can\'t succeed .... $o = imap_fetchstructure($mailbox, $messageno ); if ($o->subtype==\"PLAIN\") { $charset = $o->parameters[0]->value ; $msgbody = imap_body($mailbox, $messageno ) ; } elseif ( isset($o->parts )) { $count = count($o->parts) ; for ( $i=0 ; $i<$count ; $i++ ) { if ($o->parts[$i]->subtype==\"PLAIN\") $msgbody = imap_fetchbody($mailbox, $messageno, $i+1 ); } } Can you help ? Thanks and regards, Boris

« previous php.general (#13328) next »