Outlook Rest Api sending Mail Request returned status 400

前端 未结 1 1968
陌清茗
陌清茗 2021-01-15 09:12

I try to send email from a signed Outlook Account with Outlook Rest Api and Curl then I get this error

Request returned status 400

This is

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 09:42

    The property 'Content-Type' does not exist on type 'Microsoft.OutlookServices.ItemBody' , It should be 'ContentType' . Please refer to this document for details : https://msdn.microsoft.com/office/office365/api/complex-types-for-mail-contacts-calendar#ItemBody

    Also you need to 'send mail as a user' permission for O365 Exchange Online in Azure AD if you want to send a mail message with REST API . You could also refer to below article for more details: https://dev.outlook.com/restapi/tutorial/php

    0 讨论(0)
提交回复
热议问题