function sendEmail(recipient, subject, body, options) {
var ImageBlob = DriveApp
.getFileById('id')
.getBlob()
.setName("ImageBlob");
GmailApp.sendEmail(recipient, subject, body, {
htmlBody: options.html,
inlineImages: { image: ImageBlob }
});
// Parameters :
// sendEmail(recipient, subject, body)
// Name Type Description
// recipient String Comma separated list of email addresses
// subject String Subject of the email
// body String Body of the email
}
1 回答
服务器脚本功能,允许您将图像嵌入到消息中