I am writing a PHP script to connect to an Exchange server and read messages from a mailbox. I have it connecting to my inbox just fine. What I’m trying to do now is get PHP to connect to a different mailbox that I have access to (Let’s call it “Test Mailbox”).
I tried this code:
imap_open( '{mail.domain.com:143}Test Mailbox', 'myusername', 'mypassword' );
But it said the mailbox doesn’t exist. How can I get a list of mailboxes or get the path to the mailbox?
You should really think about doing this with Exchange Web Services (EWS). This will get you the data you want via SOAP versus IMAP which isn’t going to be able to produce alot of things.