MailApp.sendEmail({
to: " someemail@gmail.com , ",
subject: "New change for " + variable1+ " at " + variable2,
htmlBody: "Added: " + addedlist_new.toString() + "<br><br>" +
"Removed: " + removedlist_old.toString() + "<br><br>" +
" https://docs.google.com/spreadsheets/d/someurlhere ",
})
当我向其他用户发送电子邮件时,我发现我最终收到了收件箱中发送给他们的电子邮件。它显示它已发送给我在&#34; To&#34;中输入的用户。区域,但它在我的收件箱中。为什么将它放在我的收件箱而不是已发邮件中?
答案 0 :(得分:2)
我遇到了这个问题,发现用Mailapp.sendEmail
代替Gmailapp.sendEmail
是可行的。
答案 1 :(得分:1)
尝试这种方式:
var toEmail = "someemail@gmail.com";
var subject = "New change for " + variable1+ " at " + variable2;
var messageBody = "Added: " + addedlist_new.toString() + "<br><br>" + "Removed: " + removedlist_old.toString() + "<br><br>" + "https://docs.google.com/spreadsheets/d/someurlhere";
MailApp.sendEmail(toEmail , subject , "" , {htmlBody: messageBody});