本文介绍了Google Apps脚本中的MailApp.sendEmail()未发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

We establish Google G Suite for our clients and over the last few weeks, we have found that Google Apps Script does not process the MailApp.sendEmail() as expected. It only happens in new G Suite account and the exact same code in existing account function as expected.

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

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

Email address that we have used are valid email.

有什么想法吗?

推荐答案

尝试使用 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());

这是现在推荐的.

这篇关于Google Apps脚本中的MailApp.sendEmail()未发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 15:02