From b4e29edaeae8b95e7a64c54c7e3f4d16d4798eb0 Mon Sep 17 00:00:00 2001 From: A Sigalas Date: Tue, 28 Feb 2017 12:40:14 +0000 Subject: [PATCH 1/2] If Mail Account has empty password, it's still regarded as imap --- api/src/Mail/Account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail/Account.php b/api/src/Mail/Account.php index 2a2bfa3965..ccdc0bc8d2 100644 --- a/api/src/Mail/Account.php +++ b/api/src/Mail/Account.php @@ -397,7 +397,7 @@ class Account implements \ArrayAccess */ public function is_imap($try_connect=true) { - if (empty($this->acc_imap_host) || empty($this->acc_imap_username) || empty($this->acc_imap_password)) + if (empty($this->acc_imap_host) && empty($this->acc_imap_username) && empty($this->acc_imap_password)) { return false; // no imap host or credentials } From 11b2eff8c524dea971764885139c5ba91b86a181 Mon Sep 17 00:00:00 2001 From: A Sigalas Date: Tue, 28 Feb 2017 12:55:04 +0000 Subject: [PATCH 2/2] Host always needed, not imap if username & pass missing --- api/src/Mail/Account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail/Account.php b/api/src/Mail/Account.php index ccdc0bc8d2..b34016e40a 100644 --- a/api/src/Mail/Account.php +++ b/api/src/Mail/Account.php @@ -397,7 +397,7 @@ class Account implements \ArrayAccess */ public function is_imap($try_connect=true) { - if (empty($this->acc_imap_host) && empty($this->acc_imap_username) && empty($this->acc_imap_password)) + if (empty($this->acc_imap_host) || ( empty($this->acc_imap_username) && empty($this->acc_imap_password) ) ) { return false; // no imap host or credentials }