Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $mailuser="shop@stich.su";
- $mailpass="Ctljdf46f";
- $mailhost="{imap.yandex.ru:993/imap/ssl/novalidate-cert}INBOX";
- $mailbox = imap_open($mailhost,$mailuser,$mailpass) or die("<br />\nFAILLED! ".imap_last_error());
- $emails = imap_search($mailbox,'ALL');
- $output = '';
- rsort($emails);
- $num = 0;
- foreach($emails as $email_number) {
- $num++;
- $overview = imap_fetch_overview($mailbox,$email_number,0);
- echo '<pre>';
- var_dump($overview[0]);
- echo '</pre>';
- $decode_subj = mb_decode_mimeheader($overview[0]->subject);
- $u_date = $overview[0]->udate;
- if ($num==10) break;
- }
- imap_close($mailbox);
Add Comment
Please, Sign In to add comment