php-imap2 icon indicating copy to clipboard operation
php-imap2 copied to clipboard

Implement /novalidate-cert flag

Open williamdes opened this issue 2 years ago • 0 comments

The workaround, change in: src/Connection.php

        $success = $client->connect($this->host, $this->user, $this->password, array_merge($this->options, [
            'port' => $this->port,
            'ssl_mode' => $this->sslMode,
            'auth_type' => $this->flags & OP_XOAUTH2 ? 'XOAUTH2' : 'CHECK',
            'timeout' => -1,
            'force_caps' => false,
        ]));

And then:

        $mbox = imap2_open(
            '{mail-server.mail.williamdes.eu.org:993/ssl/novalidate-cert}',
            '[email protected]',
            'JohnPassWord!645987zefdm',
            0,
            0,
            [
                'socket_options' => [ 'ssl' => ['verify_peer' => false]],
            ]
        );

williamdes avatar Oct 23 '23 07:10 williamdes