I\'m working on a PHP script to read and parse error logs sent to a shared mailbox.
I\'m using imap_open() to connect.
If I connect with the following creden
Another solution that worked for us is to add the username data to the mailbox parameter using the appropriate flags.
For example, with the Office 365 configuration of
USER EMAIL: user@maindomain.com
PASSWORD: password
SHARED MAILBOX: shared@anotherdomain.com
then the imap_open call would be
imap_open("{outlook.office365.com:993/imap/ssl/authuser=user@maindomain.com/user=shared@anotherdomain.com}", "user@maindomain.com", "password");
Note the inclusion of the main user email using the /authuser flag and the shared mailbox using the /user flag.
That worked for us when the mailbox alias approach in the previous answer was not successful.