IMAP连接在本地主机中工作,但在服务器中崩溃

时间:2019-07-10 12:54:17

标签: php crash imap

我正在使用基本的imap打开功能,该功能允许我从收件箱中获取电子邮件。该功能可以在我的本地主机(沼泽)和以前的服务器上正常工作。 我们最近更改了Web服务器。现在,该功能在imap连接时使服务器崩溃。

我通过phpinfo查看了与imap相关的所有内容,但发现与本地主机的phpinfo没有区别。

这是imap构造函数,函数在最后一行崩溃。

 public function __construct($mailbox, $username, $password, $encryption = false)
    {
        $enc = '';
        if ($encryption != null && isset($encryption) && $encryption == 'ssl') {
            $enc = '/imap/ssl/novalidate-cert';
        } elseif ($encryption != null && isset($encryption) && $encryption == 'tls') {
            $enc = '/imap/tls/novalidate-cert';
        }
        $this->mailbox = '{' . $mailbox . $enc . '}';
        $this->imap    = @imap_open($this->mailbox, $username, $password);
    }

我的phpinfo:

enter image description here

enter image description here

0 个答案:

没有答案