-1

It seems that Office 365 emails are no longer to be possible to be read using normal SMTP.

There seems to be a new procedure which also requires using Azure.

I need to be able to read and also delete old emails from a mailbox. Anyone knows of a blog somewhere which explains this clearly, as some blogs I saw were a bit vague?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Post your code. – possum Nov 26 '22 at 12:43
  • MS Graph API is what you use. There is a [graph explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) you can use to test it. There is also a [graph client](https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0) you can use. If you're not operating on your own mailbox then you need an app registration with consent in Azure A.D. which you may need an admin to do for you – Crowcoder Nov 26 '22 at 12:43

1 Answers1

0

You can use Microsoft Graph which lets your app get authorized access to a user's Outlook mail data in a personal or organization account. With the appropriate delegated or application mail permissions, your app can access the mail data of the signed-in user or any user in a tenant.

The Microsoft Graph API supports accessing data in users' primary mailboxes and in shared mailboxes. The data can be calendar, mail, or personal contacts stored in a mailbox in the cloud on Exchange Online as part of Microsoft 365, or on Exchange on-premises in a hybrid deployment. Read more about that in the Use the Outlook mail REST API article.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45