diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 71d1768fedc..913b7b08a55 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -762,6 +762,11 @@ 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.'}';