Google脚本邮件未发送

时间:2017-04-06 21:38:37

标签: javascript email

我有一个应该发送电子邮件的脚本,但它只能在某些情况下使用。

第一个片段会发送邮件;如果没有发送,第二个将完成没有错误。简而言之,如果我有变量那么就不会发送。

var schoolYear = "2017-2018"
var message = "Please see the attachment for the " + schoolYear + " SGA class election name confirmation sheet. Have a great day B!";
var subject = schoolYear + " SGA Class Election Name Confirmations"
var email = "austin.hoag@icloud.com"
var name = "FHS SGA Election Name Confirmation"
MailApp.sendEmail(email, "subject", "message", {name: name});
var schoolYear = "2017-2018"
var email = "austin.hoag@icloud.com"
var name = "FHS SGA Election Name Confirmation"
var message = "Please see the attachment for the " + schoolYear + " SGA class election name confirmation sheet. Have a great day B!";
var subject = schoolYear + " SGA Class Election Name Confirmations"
MailApp.sendEmail(email, subject, message, {name: name});

0 个答案:

没有答案