【问题标题】:"Invalid argument: : Invalid to header" error in Google scripts using GmailApp.sendEmail使用 GmailApp.sendEmail 的 Google 脚本中的“无效参数::标题无效”错误
【发布时间】:2018-11-26 17:23:27
【问题描述】:

在我的 google 脚本代码的以下行中,我不断收到“无效参数::对标头无效”:

GmailApp.sendEmail(emailAddress, subject, message, {from: 'first.last@gmail.com',cc: 'michelle@gmail.com,barack@gmail.com', htmlBody: message});

我正在根据来自 google 表格文档的信息发送电子邮件。这个错误是什么意思,我该如何解决?

【问题讨论】:

    标签: google-apps-script gmail gmail-api


    【解决方案1】:

    文档中没有“from:”高级参数。您不能代表其他人发送邮件。如果您想要从他们发送的邮件,则需要从他们的帐户运行此脚本。

    https://developers.google.com/apps-script/reference/mail/mail-app

    【讨论】:

    • 糟糕,我正在查看邮件应用程序。 Soz OP。
    猜你喜欢
    • 1970-01-01
    • 2020-11-29
    • 2013-04-25
    • 2018-06-01
    • 1970-01-01
    • 2020-07-26
    • 2021-09-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多