我正在尝试将内联图像添加到电子邮件中,这正在工作,但它正在将图像添加为附件。我在这里做错了吗?
function sendEmail() {
var ss = SpreadsheetApp.getActiveSpreadsheet()
var sheet1=ss.getSheetByName('Data');
var n=sheet1.getLastRow();
for (var i = 2; i < n+1 ; i++ ) {
var emailAddress = sheet1.getRange(i,1).getValue();
var html = HtmlService.createTemplateFromFile('Document.html');
var img = DriveApp.getFileById('1NgViZuezxzqugtGFp8vPXe234s00ZNwg').getBlob();
var aliases = GmailApp.getAliases();
Logger.log(aliases);
GmailApp.sendEmail(emailAddress, 'Annual Review', html,{
htmlBody: html.evaluate().getContent(),
name: "Administrators",
from: aliases[0],
inlineImages: {image: img}
});
}
}