php-imap2
php-imap2 copied to clipboard
Implement /novalidate-cert flag
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]],
]
);