4
如何使用PHP從Gmail帳戶訪問垃圾郵件文件夾?這裏是我連接到gmails imap服務器的代碼。當我與SPAM取代INBOX它導致異常:從PHP訪問Gmail垃圾郵件文件夾
$mailbox = imap_open("{imap.googlemail.com:993/ssl}INBOX", "[email protected]", "PASSWORD");
$mail = imap_search($mailbox, "ALL");
$mail_headers = imap_headerinfo($mailbox, $mail[0]);
$subject = $mail_headers->subject;
$from = $mail_headers->fromaddress;
imap_close($mailbox);
怎麼做你連接到Gmail?顯示您的代碼... –
參見http://stackoverflow.com/questions/2185391/localized-gmail-imap-folders – tripleee