Send a full formatted mail with google apps script
<p>i am trying to send mails to some list of user using google apps-script. </p>

<p>I am taking the first draft mail and then mailing it to list of users present in the spreadsheet. But when i use ".getplainbody(); " function. It only copies the plain text in the draft.</p>

<pre><code>function sendmail() 
{
    var drafts = GmailApp.getDraftMessages();
    Logger.log(drafts.length);
    var draft = drafts[0].getPlainBody();
    Logger.log(draft);

    GmailApp.sendEmail('abc@gmail.com', 'subject', 'Hello' + '\n ' + draft);
}
</code></pre>

<p>I have also tried using the getbody() and then html with the message.</p>

<pre><code>function sendmail() 
{
    var drafts = GmailApp.getDraftMessages();
    Logger.log(drafts.length);
    var draft = drafts[0].getBody();
    Logger.log(draft);

    GmailApp.sendEmail('abc@gmail.com', 'subject', 'Hello' + '\n ' + {html: draft});
}
</code></pre>

<p>But this also gives me "[object Object]" in the inbox.
Is there any other option to send the draft mail (not in plain text format)with proper format. </p>

<p>Thanks</p>