For some reason the Gmail API won't send an html email. Sending plaintext works fine:
var message = 'From: Me <me@gmail.com>\r\n' +
'To: Me <me@gmail.com>\r\n' +
'Subject: Hello\r\n\r\n'
'World'
var raw = btoa(message)
Then when I try html, it just shows up as an empty message:
var message = 'From: Me <me@gmail.com>\r\n' +
'To: Me <me@gmail.com>\r\n' +
'Subject: Hello\r\n'
'Content-Type: text/html; charset=utf-8\r\n' +
'Content-Transfer-Encoding: quoted-printable\r\n\r\n' +
'<html><body>' +
'<h1>World</h1>' +
'</body></html>'
var raw = btoa(message)
Any ideas? Maybe because it's not RFC 2822 compliant?