如何使用GmailApp设置电子邮件正文文本颜色

时间:2018-12-25 22:12:08

标签: html google-apps-script gmail

如何使电子邮件的正文变为粉红色?

function myFunction() {
   GmailApp.createDraft("user@gmail.com" ,"Subject", "Hi! This text should be pink.");
}

1 个答案:

答案 0 :(得分:0)

尝试一下:

function myFunction() {

var body = '<font color="pink">Hi! This text should be pink.</font>';

GmailApp.createDraft("user@gmail.com" , "Subject", "", {htmlBody: body});
}