From ab8bfcedd63178cf6ad5687eaf6c94b344129c6e Mon Sep 17 00:00:00 2001 From: netandreus Date: Fri, 20 Mar 2020 14:59:08 +0300 Subject: [PATCH] Allow to use mail server self-signed certificates. --- src/Mailbox.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mailbox.php b/src/Mailbox.php index af73a48..a12f93b 100644 --- a/src/Mailbox.php +++ b/src/Mailbox.php @@ -118,7 +118,14 @@ protected function loadImapStream() 'host' => $this->imapHost, 'user' => $this->imapLogin, 'folder' => $this->imapFolder, - 'password' => $this->imapPassword + 'password' => $this->imapPassword, + 'ssl_context_options' => [ + 'ssl' => [ + 'verify_peer' => true, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ] + ] ]); if (! $imapStream) {