title: How to create a Gmail message with a specific label?
body: <p>I've been using <a href="http://wcm1.web.rice.edu/turning-gmail-into-google-reader.html" rel="nofollow">RSS2Email to turn Gmail into Google Reader</a>.</p>
  
  <p>I'd like to create a Google Apps Script to do this instead, to get two advantages:</p>
  
  <ol>
  <li><p>The scheduling would be handled by Google Apps Script. (No need to have a dedicated computer to run the script.)</p></li>
  <li><p>The resulting emails would be <strong>labeled per-feed</strong>, nicely organizing things.</p></li>
  </ol>
  
  <p>Using Google Apps Script would be the same implementation spirit as e.g. <a href="http://googleappsdeveloper.blogspot.com/2011/07/gmail-snooze-with-apps-script.html" rel="nofollow">Gmail Snooze</a>.</p>
  
  <hr>
  
  <p>I understand how to fetch the feeds. Where I'm stuck is how to create the emails <strong>using a specific label</strong>. The approaches I've investigated so far:</p>
  
  <ol>
  <li>The <a href="https://developers.google.com/apps-script/reference/gmail/" rel="nofollow">Gmail Service for Google Apps Scripts</a> doesn't allow this, at least not obviously.
  <ul>
  <li><code>GmailApp.sendEmail</code> doesn't let you specify a label. Which makes sense since this is for generic email sending. But ...</li>
  <li><code>GmailApp.sendEmail</code> returns <code>GmailApp</code>, not something you could use to ID the message and change its label later.</li>
  <li>The service also doesn't appear to let you create Gmail filters programatically, ruling out another possible way to tackle this.</li>
  </ul></li>
  <li>The <a href="https://developers.google.com/google-apps/email-migration/" rel="nofollow">Gmail Migration API</a> would be perfect to do this -- but it doesn't work for normal, consumer Gmail accounts. Gah.</li>
  <li>Google's <a href="https://developers.google.com/google-apps/gmail/imap_extensions" rel="nofollow">IMAP extensions</a> might allow this, but it's unclear to me.</li>
  </ol>
  
  <p>I suppose I could use 1, putting some UID in the Subject that I could use to look up the delivered message, to add the label (and hopefully un-uglify the Subject by removing the UID). But that seems a bit kludgy.</p>
  
  <p>Using 3, IMAP extensions, seems possibly less kludgy, although probably much more work to code and test.</p>
  
  <p>Any recommendations among these? Is there some other API or strategy?</p>