Advertisement
Guest User

Untitled

a guest
May 8th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <?php
  2. include("pop3.php");
  3. $host="pop.chinaren.com";
  4. $user="boss_ch";
  5. $pass="026007";
  6. $rec=new pop3($host,110,2);
  7. if(!$rec->open()) die ($rec->err_str);
  8. echo "open";
  9. if(!$rec->Login($user,$pass)) die($rec->err_str);
  10. echo "login";
  11. if(!$rec->stat()) die($rec->err_str);
  12. echo "total:".$rec->messages."mails,total:".$rec->size."bytes<br>";
  13. if($rec->message>0)
  14. {
  15.     if(!$rec->listmail()) die($rec->err_str);
  16.     echo "mails as below:<br>";
  17.     for($i=1;$i<=count($rec->mail_list);$i++)
  18.     {
  19.         echo "mail:".$rec->mail_list[$i][num]."size:".$rec->mail_list[$i][size]."<br";
  20.        
  21.     }
  22.     $rec->getmail(1);
  23.     echo "mail header:<br>";
  24.     for($i=0;$i<count($rec->head);$i++)
  25.     {
  26.         echo htmlspecialchars($rec->head[$i])."<br\n";
  27.         echo "mail contend:<br>";
  28.         for($i=0;$i<count($rec->body);$i++)
  29.         {
  30.             echo htmlspecialchars($rec->body[$i])."<br>\n";
  31.         }
  32.        
  33.        
  34.     }
  35.     $rec->Close();
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement