How can I filter mails obtained by IMap ?? Who did it? Consulted & lt ;? Phprequire_once ('.. /ImapMailbox. php '); // & nbsp; IMAP & nbsp; must & nbsp; be & nbsp; enabled & nbsp; in & nbsp; how can I filter emails by Google & n IMap ?? Who did it? Consulted
Require_once ('../ImapMailbox. php ');
// IMAP must be enabled in Google Mail Settings
Define ('Gmail _ e-mail ','');
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 foreach ($ mailbox-> searchMails ('all') as $ mailId ){
Can I replace this parameter with ALL?
Otherwise, there will be 0.1 million emails in the mailbox, and 0.1 million requests will be sent, and I only need to find the first one hour
------ Solution --------------------
Wow, I just closed the post when I first came in. I need a person who scores the post.