我尝试了很多方法,但无法在hostgator托管中连接到imap,怎么做
这是我的代码
$mbox = imap_open("{mail.liveslink.com:143/notls/norsh/novalidate-cert}", "adriano@liveslink.com","clecio")or die(imap_last_error())or die("can't connect: ".imap_last_error());
我收到此错误
Warning: imap_open(): Couldn't open stream {mail.liveslink.com:143/notls/norsh/novalidate-cert} in /home3/adriano/public_html/teste/index.php on line 3
无法向IMAP服务器进行身份验证:[AUTHENTICATIONFAILED]身份验证失败。
请帮帮我
答案 0 :(得分:1)
你可以尝试下面的代码,我测试和工作就像一个魅力!
<?php
echo 'before imap_open';
$inbox = imap_open("{mail.liveslink.com:143}","adriano@liveslink.com","clecio") or die('Could not connect to mail server');
$num_msg = $imap_num_msg($inbox);
echo $num_msg;
imap_close($inbox);
?>