Rumah >pembangunan bahagian belakang >tutorial php >IMap获取信件内容怎么筛选邮件??谁做过?请教了
<?phprequire_once('../ImapMailbox.php');// IMAP must be enabled in Google Mail Settingsdefine('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 "<pre class="brush:php;toolbar:false">";var_dump($mails);
我已经知道了 结贴
哇靠,刚进来就结贴了,结贴需要个拿分的人
strpos 这个