-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SendMail fails with empty Message.InternetMessageHeaders collection #2208
Comments
Thanks for raising this @obartelt As the error is returned by API and SDK will send data as you specify, implementing the change would need to be done from the API side. As this repo is mainly intended for SDK related feature requests, any chance you can request the feature at the link below for visibility of the API owners? It would be great if you could post back the link as a comment so that anyone else with the question may also be able to discover it and upvote it as well. https://feedbackportal.microsoft.com/feedback/forum/ebe2edae-97d1-ec11-a7b5-0022481f3c80 |
I'm not sure that the error is generated by the API, as with the 4.x SDK, everything was working fine. I only noticed the error after switching to 5.x. Have you tested that the SDK actually sends something? Or can you tell me how to diagnose that further? |
Thanks for clarifying @obartelt. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
When trying to send a Message with an empty InternetMessageHeaders collection via SendMail.PostAsync (both Me and Users[id] affected), an error 400 is returned with the message that the number of internet message headers is invalid (should be less or equal to 5). When the InternetMessageHeaders property is null, the mail is sent correctly. Also affects Messages.PostAsync to create a draft.
Expected behavior: ignore the empty collection.
Version: Microsoft.Graph 5.34.0, .NET Standard 2.0 with .NET 6.0 test application
The text was updated successfully, but these errors were encountered: