Google Apps Script 中的 MailApp.sendEmail() 不发送电子邮件 [英] MailApp.sendEmail() in Google Apps Script not sending email

查看:50
本文介绍了Google Apps Script 中的 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 Script 中的 MailApp.sendEmail() 不发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆