title: Set internalDateSource in Gmail API message upload
body: <p>I'm trying to import messages from imap to Gmail via <a href="https://developers.google.com/gmail/api/v1/reference/users/messages/insert" rel="nofollow">Gmail API v1</a>. If I use the API call for insert, I can specify internalDateSource to dateHeader. With that setting the message will display the original sent date in Gmail, instead of the import date. </p>
  
  <p>If I use the <a href="https://developers.google.com/gmail/api/v1/reference/users/messages/insert" rel="nofollow">Gmail API Upload</a> method, I don't see any option to specify the internalDateSource in the multipart message header. So Gmail will use the latest receive header, which is the import.</p>
  
  <pre><code>Received: from 661831859263-hlgnfsakj37rged896gvl0mitub85lii.apps.googleusercontent.com
  named unknown
  by gmailapi.google.com
  with HTTPREST;
  Wed, 4 Mar 2015 00:01:04 -0800
  </code></pre>
  
  <p>Any ideas how to display the original delivery or sent date in Gmail when uploading a message via upload request?</p>