Advertisement
Guest User

Untitled

a guest
May 18th, 2017
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. $host='{mail.example.com/notls/imap4}INBOX'; //Host to connect
  2. $user='user';
  3. $pass='password';
  4. $from='someone@example.com'; //Mail to send from
  5.  
  6. $mail=@imap_open($host,$user,$pass) or die("Can't connect: " . imap_last_error());
  7.  
  8. //PROXY??
  9.  
  10. $mailbox = imap_open("{localhost:143/imap/novalidate-cert}INBOX", "user","pw");
  11.  
  12. int imap_uid ( resource $imap_stream , int $msg_number )
  13.  
  14.    echo imap_body($mail,$number);
  15.  
  16. $mails=imap_num_msg($mail);
  17. echo "$mails mails<p>";
  18.  
  19. imap_close($mail);
  20. ?>
  21.  
  22.  
  23. Open IMAP. If it loads, display it on the screen, then save it to file. If it fails, just print out the file. (Unless, say, a month has passed, in which case post a generic message? Check the file date) (Possibly post all emails from the past seven days? Harder to manage, though)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement