For some reason, the Gmail API will not send an html email address. 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 displays 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 does not comply with RFC 2822?
source
share