note 95133 modified in function.imap-body by danbrown
| From: | danbrown@php.net | Date: | Fri, 15 Jun 2012 15:57:27 +0000 |
| Subject: | note 95133 modified in function.imap-body by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188631@lists.php.net to get a copy of this message | ||
Simple example on how to read body message of the recent
mail. <?php $imap =
imap_open("{pop.example.com:995/pop3/ssl/novalidate-cert}",
"username", "password"); if(
$imap ) { //Check no.of.msgs $num
= imap_num_msg($imap); //if there is a message in your
inbox if( $num >0 ) { //read that mail
recently arrived echo imap_qprint(imap_body($imap,
$num)); } //close the
stream imap_close($imap); } ?>
--was--
Simple example on how to read body message of the recent mail.
<?php
$imap = imap_open("{pop.example.com:995/pop3/ssl/novalidate-cert}", "username",
"password");
if( $imap ) {
//Check no.of.msgs
$num = imap_num_msg($imap)
//if there is a message in your inbox
if( $num >0 ) {
//read that mail recently arrived
echo imap_qprint(imap_body($imap, $num));
}
//close the stream
imap_close($imap);
}
?>
http://php.net/manual/en/function.imap-body.php