Closed dorinsimina closed 9 years ago
The payload message sent is incorrect when the message does not have any attachment and this causes the error. If I construct manually the call to the REST service it works (by specifying also the attachment field to be nil).
I had hit the similar issue. After debugging, it turned out that passing enum values as integers instead of specific strings was causing the issue. Currently we send "Importance": 1 instead of "Importance": "Normal" which fails. Same with contentType.
{ "Message": { "Subject": "Test subject", "Body": { "ContentType": "Text", "Content": "Test body" }, "Importance": "Normal", "HasAttachments": "false", "IsDeliveryReceiptRequested": "false", "IsReadReceiptRequested": "false", "IsDraft": "false", "IsRead": "false", "ToRecipients": [ { "EmailAddress": { "Address": "xyz@microsoft.com" } } ] }, "SaveToSentItems": "false" }
This issue should be fixed in the new SDK version.
When sending an email using the sample I got the following error. Does anyone know why?
Send email: Error Domain=Error in the Request Code=400 "The operation couldn’t be completed. (Error in the Request error 400.)" UserInfo=0x7a770610 {error={ code = ErrorInvalidRequest; message = "Cannot read the request body."; }}