Don't rely on "chunked" mode for sending EAS 14 email

* Some reverse-proxies in front of Exchange servers don't handle
  "chunked" data; this appears fairly common and causes an HTTP
  411 (Length required) error when sending mail
* To fix this, we calculate/send the content length and send that
  explicitly
* Tested on our Exchange 2010 server; the calculated length is
  demonstrated to be correct in all tested cases (i.e. any other
  length sent will result in failure)

Bug: 5796904
Change-Id: I802de90764422a608d4ed2c752a791074febed85
2 files changed