Exchange php email reader

This project is going to sound pretty stupid. Heads up. I was in a marketing class, and was doing some testing on different email addresses. At the time, we were given free versions of Microsoft Exchange, so I had that set up on a box that I ran at my house. This was before Outlook Web Access was a thing. And I wasn't using POP3 or IMAP because I had tons of addresses set up. In hindsight, I should have had them set up as aliases, but oh well.

Because I had a bunch of email addresses, but wanted to manage them in one place, I found this great method for accessing them all in one place. I would write a php script that would go into the Exchange server folder, and would pull up the files associated with each email address, and parse out the subject line, and show the subject line, with a link to view the whole email.

Now most setups like this would need a lot of security so you didn't pull up an email with javascript, or a malicious link or anything, but that never occurred to me. So I just threw it out there and was using it to manage all these accounts. I definitely wouldn't recommend that to anyone thinking of running their own mail server.