Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rashad Aliyev  >  MicroPHP Mail Checker  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample file
Class: MicroPHP Mail Checker
Check e-mail messages in IMAP or POP3 mailboxes
Author: By
Last change:
Date: 2006-05-21 19:43
Size: 706 bytes
 

Contents

Class file image Download
<?php

include("mailchk.class.php");
$mail = new Mailchk();
$mail->mailbox "{your.imap.host:143}";
$mail->username "username";
$mail->password "password";
$mail->openMail();

//print_r($mail->listMails());
$mailArr $mail->listMails();
for (
$i=0$i<count($mailArr); $i++)
{
    echo (
$i+1) .") ";
    echo 
"<b>Sender: </b>"$mailArr[$i]['sender'] ."<br />";
    echo 
"<b>to: </b>"$mailArr[$i]['to'] ."<br />";
    echo 
"<b>date: </b>"$mailArr[$i]['date'] ."<br />";
    echo 
"<b>size: </b>"$mailArr[$i]['size'] ."<br />";
    echo 
"<b>subject: </b>"$mailArr[$i]['subject'] ."<br />";
    echo 
"<b>body: </b>"$mailArr[$i]['body'] ."<br />";
    echo 
"<br />\n";
}

$mail->closeMail();
?>