Accessing Shared Mailboxes in Office365 with PHP

By | 22 March 2016

After a lot of trying&failing, this setup worked for me when connecting to a shared mailbox in office365:

  1. As the username, use “your_username\shared_mailbox_alias” (your_username needs access to the shared mailbox of course)
  2. Add the extended option ‘DISABLE_AUTHENTICATOR’ => ‘PLAIN’

Example:
$conn = imap_open(
"{outlook.office365.com:993/imap/ssl}Inbox",
'[email protected]\shared_mailbox_alias',
'mypassword',
OP_READONLY,
1,
array('DISABLE_AUTHENTICATOR' => 'PLAIN')
);

Leave a Reply

Your email address will not be published. Required fields are marked *