搜尋

首頁  >  問答  >  主體

php imap接收qq郵件的問題

寫一個接收郵件的代碼,提示無法連接,qq郵箱已開啟imap,下面貼上代碼,麻煩各位幫忙看看?

$host = '{imap.qq.com:993/imap/ssl}INBOX';
$user = '*****';
$pass = '*****';
$inbox = imap_open($host, $user, $pass)or die("can't connect: " . imap_last_error());   
$mailboxes = imap_list($inbox, $host, '*');
$mailboxes = str_replace($host, '', $mailboxes);
print_r($mailboxes);

貼上錯誤代碼:從騰訊信箱看到地址是imap.qq.com 提示報錯。 。
Warning: imap_open(): Couldn't open stream {imap.qq.com:993/imap/ssl}INBOX in D:phpStudyWWWimap.php on line 5
can't connect: Please using authorized code toauthorized code to login. More information at http://service.mail.qq.com/cg...
Notice: Unknown: Please using authorized code to login. More information at http://service.mail.qq.com/ cg... (errflg=1) in Unknown on line 0

伊谢尔伦伊谢尔伦2740 天前938

全部回覆(1)我來回復

  • 大家讲道理

    大家讲道理2017-05-24 11:33:20

    是不是沒有用授權碼登陸?

    回覆
    0
  • 取消回覆