gpt4 book ai didi

php - 无法使用 imap_open () 连接

转载 作者:可可西里 更新时间:2023-11-01 13:47:49 24 4
gpt4 key购买 nike

我正在尝试使用 imap_open() 连接并获取我的主机电子邮件地址的消息,但它抛出错误。

$server = '{mail.booksnearby.in:143/imap/ssl/novalidate-cert}INBOX';
$imap_connection = imap_open($server, $login, $password);
$mailboxinfo = imap_mailboxmsginfo($imap_connection);
$messageCount = $mailboxinfo->Nmsgs;

以上抛出此错误:Array ( [0] => Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed.

如果我将 $server 更改为

$server = '{mail.booksnearby.in:143}INBOX';   

然后它抛出以下错误

Certificate failure for mail.booksnearby.in: self signed certificate:

如果$server是

$server = '{mail.booksnearby.in:143/imap/ssl/novalidate-cert}INBOX'; 

它抛出

Array ( [0] => TLS/SSL failure for mail.booksnearby.in: SSL negotiation failed )

我可以使用电子邮件客户端使用相同的用户名密码连接到电子邮件帐户。

我似乎也无法远程登录。它正在运行 apache、cpanel 和 dovecat。在我的主机上启用了支持 Ssl 的 Imap..

最佳答案

您确定端口号是 143(而不是 993)吗?正如我所见,因为您正在使用带有自签名证书的安全连接。尝试这样做:

$server = '{mail.booksnearby.in:993/imap/ssl/novalidate-cert}INBOX';

关于php - 无法使用 imap_open () 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11610463/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com