title: Retrofit 2 send mail via MS graph api returns The value of the parameter 'Message' is empty
body: <p>I have a Java Spring project which uses Retrofit 2 to make API calls to the Graph API from Microsoft. I am able to authenticate, read mail boxes and retrieve/read emails. However i am struggling with sending mails. </p>
  
  <p>I have the following code for sending an email:</p>
  
  <p><strong>Permissions:</strong> Contains the Mail.send</p>
  
  <pre><code>    private String[] scopes = [
              "openid",
              "email",
              "profile",
              "User.Read",
              "Mail.Read",
              "Mail.Send",
              "Mail.ReadWrite",
              "Calendars.Read",
              "Calendars.ReadWrite",
              "Contacts.Read",
              "Contacts.ReadWrite",
              "offline_access"
      ];
  </code></pre>
  
  <p><strong>Retrofit Call:</strong></p>
  
  <pre><code>    @Headers("Content-Type: application/json")
      @POST("/v1.0/me/sendMail")
      Call&lt;Message&gt; sendMessage(
              @Body String messageObject
      );
  </code></pre>
  
  <p><strong>The String that is sent is a JSONString:</strong></p>
  
  <pre><code>"{\"Message\":{\"toRecipients\":[{\"address\":\"test@test.be\",\"name\":\"test@test.be\"}],\"Body\":{\"ContentType\":\"text/html\",\"Content\":\"value(Email_body)=%3Cp%3Etesttext%3C%2Fp%3E\"},\"Subject\":\"testsubject\"},\"SaveToSentItems\":\"true\"}"
  </code></pre>
  
  <p><strong>HTTP Response:</strong></p>
  
  <pre><code> &lt;-- 400 Bad Request https://graph.microsoft.com/v1.0/me/sendMail (101ms)
   Cache-Control: private
   Transfer-Encoding: chunked
   Content-Type: application/json
   request-id: 94d19c39-4b84-4ee9-98d2-d42d36886e40
   client-request-id: 0c9d2c63-28bf-49c4-9ad6-08d81c6fd4b0
   x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"SliceC","Ring":"5","ScaleUnit":"003","RoleInstance":"AGSFE_IN_27"}}
   Strict-Transport-Security: max-age=31536000
   Date: Wed, 09 Oct 2019 07:41:54 GMT
  
   {
    "error": {
      "code": "ErrorInvalidParameter",
      "message": "The value of the parameter 'Message' is empty.",
      "innerError": {
        "request-id": "94d19c39-4b84-4ee9-98d2-d42d36886e40",
        "date": "2019-10-09T07:41:54"
      }
    }
  }
  &lt;-- END HTTP (253-byte body)
  </code></pre>
  
  <p>Any idea what is causing the error?</p>