Any good way to use javax.mail (jakarta.mail) with MS Graph API?

Eugene S 25 Reputation points
2023-12-27T12:48:51.7366667+00:00

Hi Team!

Currently we have a lot of legacy code working with outlook.office365.com via javax.mail abstractions. I.E. when we request a store it will be javax.mail.Store, when we are working with message - it will be javax.mail.Message.

final javax.mail.Store mailStore = session.getStore(protocol);

And there is a lot of code, relying on javax.mail abstraction.

But when working with MS Graph API what returned from API SDK is com.microsoft.graph.models.Message, etc., which is not compatible with the legacy code.

Is there any way to use MS graph API, but still keep javax.Mail (or jakarta.mail) abstractions? Maybe without MS java graph SDK libraries?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Arun Jain 0 Reputation points
    2024-06-03T12:28:16.85+00:00

    Any solution to above use case?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.