From 35e6ab2cced10343c7ec258d6ca6396763e1a3ef Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 12 May 2022 12:17:19 +0200 Subject: [PATCH] https://github.com/the-djmaze/snappymail/issues/372#issuecomment-1119861495 --- .../v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php index 7a80be91b..04cbfd569 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php @@ -140,6 +140,13 @@ class ImapClient extends \MailSo\Net\NetClient break; } } + if (!$type) { + throw new \Exception('No supported SASL mechanism found, remote server wants: ' + . \implode(', ', \array_filter($this->Capability() ?: [], function($var){ + return \str_starts_with($var, 'AUTH='); + })) + ); + } $SASL = \SnappyMail\SASL::factory($type); $SASL->base64 = true;