简体   繁体   中英

define specific cell in google sheet

I found the below JavaScript code and I really need it but with some changes.
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] .
Then the script delays 1 minute or any thing and goes to send next A3 and loop

Google Apps script has a Utilities class, which among other things provides a sleep method.

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.
Insert this in the row directly following the call to MailApp.sendEmail before the closing bracket.

Be aware that there is a limit on how long scripts can run (6 minutes) and sleeping counts towards that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM