title: How would you attach an excel document using MailJet api
body: <p>Hello I have tried using mailjets api to send an excel document. 
  I first encode the excel file to base64 using mailjets library.
  I then use mailjets library to add the file as an attachment and set the mime type application/vnd.ms-excel.
  Heres an example. </p>
  
  <pre><code> request = new MailjetRequest(Emailv31.resource)
              .property(Emailv31.MESSAGES, new JSONArray()
                  .put(new JSONObject()
                      .put(Emailv31.Message.FROM, new JSONObject()
                          .put("Email", "pilot@mailjet.com")
                          .put("Name", "Mailjet Pilot"))
                      .put(Emailv31.Message.TO, new JSONArray()
                          .put(new JSONObject()
                              .put("Email", "passenger1@mailjet.com")
                              .put("Name", "passenger 1")))
                      .put(Emailv31.Message.SUBJECT, "Your email flight plan!")
                      .put(Emailv31.Message.TEXTPART, "Dear passenger 1, welcome to Mailjet! May the delivery force be with you!")
                      .put(Emailv31.Message.HTMLPART, "&lt;h3&gt;Dear passenger 1, welcome to &lt;a href=\"https://www.mailjet.com/\"&gt;Mailjet&lt;/a&gt;!&lt;/h3&gt;&lt;br /&gt;May the delivery force be with you!")
                      .put(Emailv31.Message.ATTACHMENTS, new JSONArray()
                          .put(new JSONObject()
                              .put("ContentType", "application/vnd.ms-excel")
                              .put("Filename", "test.txt")
                              .put("Base64Content", "excelFileBase64")))));
        response = client.post(request);
  
  </code></pre>
  
  <p>However I always receive the file as its string represented base64 encoded.</p>