Google Apps脚本中的MailApp.sendEmail()未发送电子邮件

时间:2018-10-31 08:39:48

标签: google-apps-script

我们为客户建立了Google G Suite,在过去的几周中,我们发现Google Apps脚本未按预期处理MailApp.sendEmail()。它只会在新的G Suite帐户中发生,并且与预期的现有帐户功能完全相同的代码。

function testemail(){
  MailApp.sendEmail("gordon@........", "TEST", "Hello world");
  return;
}

我们使用的电子邮件地址是有效的电子邮件。

有什么想法吗?

1 个答案:

答案 0 :(得分:3)

尝试使用GmailApp.sendEmail()

// The code below will send an email with the current date and time.
var now = new Date();
GmailApp.sendEmail("mike@example.com", "current time", "The time is: " + now.toString());

这是现在推荐的。

相关问题