我有问题MailApp.sendEmail()
。我尝试通过 Google 电子表格中的脚本发送电子邮件。我的脚本适用于我的帐户,但不适用于我朋友的帐户。我收到这条消息:
消息被拒绝。有关详细信息,请参阅https://support.google.com/mail/answer/69585。最终收件人:rfc822;xx@xx.xx 操作:失败状态:5.0.0 诊断代码:smtp;消息被拒绝。有关详细信息,请参阅https://support.google.com/mail/answer/69585。上次尝试日期:2018 年 3 月 21 日星期三 05:41:31 -0700 (PDT)
我使用了 Martin Hawksey 教程脚本(经过一些修改):
var TO_ADDRESS = "xxx@gmail.com";
// spit out all the keys/values from the form in HTML for email
function formatHtmlMailBody(obj, order) {
var result = "html text";
// loop over all keys in the ordered form data
for (var idx in order) {
var key = order[idx];
result += key + " " + obj[key];
}
return …
Run Code Online (Sandbox Code Playgroud)