[英]define specific cell in google sheet
I found the below JavaScript code and I really need it but with some changes.我找到了下面的 JavaScript 代码,我真的很需要它,但做了一些更改。
this link Sending emails from a Spreadsheet此链接从电子表格发送电子邮件
let see the problem here:让我们看看这里的问题:
var emailAddress = row[0]; // First column
Now I'm trying to make script send an email mail defined by cell A2 not all emails in row[0]
.现在我试图让脚本发送由单元格A2定义的电子邮件,而不是
row[0]
所有电子邮件。
Then the script delays 1 minute or any thing and goes to send next A3 and loop然后脚本延迟 1 分钟或任何事情并发送下一个A3并循环
Google Apps script has a Utilities class, which among other things provides a sleep method. Google Apps 脚本有一个Utilities类,其中提供了一个sleep方法。
To have the script for a minute before sending an email to the next recipient try inserting Utilities.sleep(60000)
, to have it sleep for 60k milliseconds to have it wait for one minute.要在向下一个收件人发送电子邮件之前让脚本运行一分钟,请尝试插入
Utilities.sleep(60000)
,让它休眠 60k 毫秒以等待一分钟。
Insert this in the row directly following the call to MailApp.sendEmail
before the closing bracket.在结束括号之前直接将其插入到调用
MailApp.sendEmail
之后的行中。
Be aware that there is a limit on how long scripts can run (6 minutes) and sleeping counts towards that.请注意, 脚本可以运行的时长(6 分钟) 是有限制的,睡眠也算在内。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.