You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Workspace账户中Apps Script的MailApp.sendEmail无法正常发送邮件求助

MailApp.sendEmail() 在Google Workspace账户中发送邮件显示已发送但全部退回的问题

背景

我们是一家非营利组织,此前长期使用标准Google账户的Sheets、Forms及Apps Script,其中依赖MailApp.sendEmail()的脚本一直运行正常。近期迁移至Google Workspace账户(因更高限额),但测试时发现所有Workspace账户的MailApp邮件功能失效。

注意:Workspace账户内普通用户手动发送邮件功能正常,内部多个账户已发送大量邮件,整体邮件配置无问题。

测试代码

我们使用以下测试脚本验证问题:

function testEmail() {
  Logger.log('testEmail START');
  var address = 'firstexternal@domain.com,secondexternal@anotherdomain.com,personalemail@gmail.com,testaccount@ourworkspacedomain.com';
  
  // Create the html version of the response email    
  var html_mailBody = 'Hello this is a test email<br><br>';

  // Create the text version of the response email
  var text_mailBody = 'Hello this is a test email\n\n';
  
  // Send the email
  MailApp.sendEmail({
    to: address,
    subject: "Test Email to three different recipients",
    body: text_mailBody,
    htmlBody: html_mailBody
  });
  Logger.log('testEmail END');
}

问题现象

  • 脚本执行无报错,发送账户的已发送文件夹中能看到该邮件
  • 所有收件人(两个外部域名账户、一个Workspace域内账户、一个外部@gmail.com账户)均未收到邮件
  • Google Workspace Admin Console邮件日志显示:所有收件人对应的邮件状态为bounced;发件人侧显示“delivered to Gmail mailbox”(已存入已发送文件夹)
  • 退回日志仅显示“delivered to an SMTP server”后立即标注“bounced”,无服务器地址详情,且未收到实际退回邮件,无法查看邮件头信息

已排查情况及诉求

  • 查阅资料仅看到建议改用GmailApp,该方案可行,但我们不愿在迁移时调整所有脚本
  • 若MailApp在Workspace中不可用,应有更多相关反馈,因此怀疑是Workspace域配置问题
  • 已联系Workspace支持但未得到有效解决

求助:确认MailApp是否可在Google Workspace账户中正常使用,或是否有其他用户遇到此类问题及解决办法。


内容的提问来源于stack exchange,提问作者Paul Rousell

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 17:28:28