From d8ae40c647f155fe84c88c0978aca0667076a167 Mon Sep 17 00:00:00 2001 From: Randall Mora <50120822+randallmoraes@users.noreply.github.com> Date: Fri, 7 Jan 2022 12:30:56 -0600 Subject: [PATCH 1/2] add support for sharedmailbox in office365 with 4 code lines enable support when a mailbox is shared... --- htdocs/emailcollector/class/emailcollector.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 729762be327..d6204fa632f 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -762,7 +762,12 @@ class EmailCollector extends CommonObject if ($norsh || !empty($conf->global->IMAP_FORCE_NORSH)) { $flags .= '/norsh'; } - + //Used in shared mailbox from Office365 + if (strpos($this->login,'/') != false) { + $partofauth = explode ('/',$this->login); + $flags .= '/authuser='.$partofauth[0].'/user='.$partofauth[1]; + } + $connectstringserver = '{'.$this->host.':993'.$flags.'}'; return $connectstringserver; From 912f0a8b95aee54c4ad7ef1a12645ae960296fa3 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 7 Jan 2022 18:34:00 +0000 Subject: [PATCH 2/2] Fixing style errors. --- htdocs/emailcollector/class/emailcollector.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index d6204fa632f..7a4330aa161 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -763,11 +763,11 @@ class EmailCollector extends CommonObject $flags .= '/norsh'; } //Used in shared mailbox from Office365 - if (strpos($this->login,'/') != false) { - $partofauth = explode ('/',$this->login); + if (strpos($this->login, '/') != false) { + $partofauth = explode('/', $this->login); $flags .= '/authuser='.$partofauth[0].'/user='.$partofauth[1]; } - + $connectstringserver = '{'.$this->host.':993'.$flags.'}'; return $connectstringserver;