I don't know if I understand the question, I'm trying
That gonna help https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0&preserve-view=true
Anyway in Desktop Outlook 4 Win do not support PHP Scripts. You can use HTML code to create email, but you cant run code from inside (a security issue)
You can use VBA from any Office application or VB scripts commend or build Addin using Visual Studio.