How does IMAP get the message content to filter the mail?? Who did? consulted the
Require_once ('.. /imapmailbox.php ');
IMAP must is enabled in Google Mail Settings
Define (' Gmail_email ', ');
Define (' Gmail_password ', ');
Define (' Attachments_dir ', DirName (__file__). '/attachments ');
$mailbox = new Imapmailbox (' {xxxx/notls}inbox ', Gmail_email, Gmail_password, Attachments_dir, ' utf-8 ');
$mails = Array ();
foreach ($mailbox->searchmails (' all ') as $mailId) {
$mail = $mailbox->getmail ($mailId);
$mailbox->setmailasseen ($mail->mid);
$mailbox->deletemail ($mail->mid);
$mails [] = $mail;
}
echo "";
Var_dump ($mails);
The key is here foreach ($mailbox->searchmails (' all ') as $mailId) {
This parameter all, can be replaced by other
Otherwise there are 100,000 letters in the mailbox, to find 100,000 times, and I just want to find the first 1 hours of
------Solution--------------------
Wow, I just came in and I got a knot, and I need someone to get a point.