2016-08-16 64 views
0

我試過很多方法,但不能連接在HostGator的到IMAP託管,怎麼做連接到郵件我無法與PHP腳本HostGator的

這裏是我的代碼

$mbox = imap_open("{mail.liveslink.com:143/notls/norsh/novalidate-cert}", "[email protected]","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]身份驗證失敗。

請幫我

回答

1

你可以試試下面的代碼,我測試和工程就像一個魅力!

<?php 
    echo 'before imap_open'; 
    $inbox = imap_open("{mail.liveslink.com:143}","[email protected]","clecio") or die('Could not connect to mail server'); 
    $num_msg = $imap_num_msg($inbox); 
    echo $num_msg; 
    imap_close($inbox); 
?>