Vincent Decaux
Vincent Decaux

Reputation: 10714

Get emails from Office 365 mailbox in PHP

I want to list emails from an Exchange Office 365 mailbox. I saw on official documentation a Mail Rest API exist.

I tried https://outlook.office365.com/EWS/OData/Me/Inbox/Messages and it works. I can get my emails in JSON format.

But, I want to list like 10 different accounts, is there another solution ? Can I log to several accounts using this API ? Or should I use Imap (or POP3) connection ?

Upvotes: 0

Views: 4337

Answers (1)

Michael Mainer
Michael Mainer

Reputation: 3465

Try https://outlook.office365.com/EWS/OData/Users('[email protected]')/Inbox/Messages. I'm not sure whether accessing other's mailboxes is supported through delegate access, Exchange Impersonation, or some other permission mechanism.

Found the information here: http://msdn.microsoft.com/EN-US/library/office/dn605896(v=office.15).aspx

Upvotes: 1

Related Questions