Hi all, wondering if the following is possible.

A MS Exchange server is connected to an Outlook client. Would it be possible to capture sent/recieved emails and add them to a database using PHP.

I would like to investigate whether I could use this functionality to create a small email ticketing system, however, i would also like to retain use of the mailbox.

The Exchange server is hosted through a subscription with Office 365, so I can administrate the server, but am not exactly in control of it.

...Could I use IMAP, this seems like a pretty neat solution? http://php.net/manual/en/book.imap.php

Looks like a way but. Isn't there always a but? The code seems to need the password in the code. This means that it's a support problem in the making so with that out in the open, go ahead and solve it but ponder security implecations and more.