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

Gor*_*n K 2 google-apps-script

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

function testemail(){
  MailApp.sendEmail("gordon@........", "TEST", "Hello world");
  return;
}
Run Code Online (Sandbox Code Playgroud)

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

有任何想法吗?

Riy*_*eed 5

尝试使用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());
Run Code Online (Sandbox Code Playgroud)

现在是推荐的。