In exchange environment I have PHP application setup to open and IMAP stream and parse emails. I have no problem connecting to my personal email account with the following:
imap_open("{exchange.server/ssl}INBOX", "username", "password");
Now I have been given access to a group email account and I'm wondering if its possible to specify other accounts with PHP's IMAP functions. I know when I setup outlook with a new profile I add the group email then my credentials with no problems.
I've also see telnet commands that support this in How can I access a shared Exchange mailbox with IMAP (over telnet)?
TELNET: ? LOGIN domain/username/mailboxname password
Using this logic I have tried:
imap_open("{exchange.server/ssl}INBOX", "username/sharedmailbox", "$password");
This gives an error I've also tried to add the domain with no luck.
Turns out I was very close with what I posted in the question however I was including @example.com for sharedmailbox@example.com
in the imap_open()
. Once I removed that I had no problem connecting with the following.
imap_open("{exchange.server/ssl}INBOX", "domain/username/sharedmailbox", "$password");