Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

office365 shared mailbox read

Hi all,

just a sum-up about the e-mail retriving of an office365 shared mailbox. The fact is than with osTicket 1.10 I was unable to configure the good imap connection.

I wrote an hack to fix this issue based on this blog entry :

to fix it, please open include/class.mailfetch.php
and replace the open function with the following code :

function open($box='INBOX') {

if ($this--->mbox)

/*$args = array($this->srvstr.$this->mailbox_encode($box),
$this->getUsername(), $this->getPassword());*/
$args = array('{}Inbox',$this->getUsername()."\support", $this->getPassword(),OP_READONLY,

// Disable Kerberos and NTLM authentication if it happens to be
// supported locally or remotely
if (version_compare(PHP_VERSION, '5.3.2', '>='))
$args += array(NULL, 0, array(

$this->mbox = @call_user_func_array('imap_open', $args);

return $this->mbox;



In my case "support" is my shared mailbox name :

It's not a perfect hack but useful !


  • I've moved this thread to Mods and Customizations.

    osTicket does not support SHARED mailboxes, but thanks for posting your mod.  Someone else may find it useful. :)

    As a side note to anyone reading this in the US:  If your organization is required to follow HIPAA, shared mailboxes violate HIPAA regs.

  • Hi, if i use this mod the whole site does not work anymore!! HTTP ERROR 500.

  • edited March 2017

    Found the problem

    second line : if ($this--->mbox) should be if ($this->mbox)

    last line: ]]> should be left away..

    After that i get this in the mail settings:

    Certificate failure for Server name does not match certificate: /C=US/ST=WASHINGTON/L=Redmond/O=Microsoft Corporation/

    We use ip adress of because there is something with the dns.

Sign In or Register to comment.