小编GGG*_*GGG的帖子

如何使用 sendEmail(to,replyTo, subject, body) 将电子邮件转发到另一个地址

如果您能提供帮助,我将不胜感激。

我需要在我的 gmail 1@example.com 中找到所有未读的电子邮件,并使用 sendEmail(to,replyTo, subject, body) https://developers.google.com/apps-script将它们全部发送到 2@example.com /reference/mail/mail-app

我试图写一个脚本,但不幸的是它不需要工作。我希望你能帮忙

function RespondEmail(e) {

//send response email
var threads = GmailApp.search("to:(1@example.com) label:unread");
for (var i = 0; i < threads.length; i++) {
threads[i].sendEmail("1@example.com",
               "2@example.com",
               "TPS report status",
               "What is the status of those TPS reports?")}


// mark all as read
var threads = GmailApp.search("to:(1@example.com) label:unread");
GmailApp.markThreadsRead(threads);
}
Run Code Online (Sandbox Code Playgroud)

如果您能告诉我如何根据我在 1@example.com 上收到的原始电子邮件更改 ReplyTo 电子邮件的主题,我也会很高兴

google-apps-script

2
推荐指数
1
解决办法
5589
查看次数

标签 统计

google-apps-script ×1