The following Google Apps Script code archives Delivered message to another sheet so that there is a permanent record of when emails were sent (as they do not appear in the Sent label of Gmail when using the scheduler) and so the main sheet does not become clogged.
Archived email |
There is a noticeable regular expression (regex) element which is designed to match the word Delivered encompassed by wildcards, from the Status column - as this cell will also contain the time the email was sent.
var status = emailData[i][5];
var isMatch = status.match(/.*Delivered.*/);
Logger.log('isMatch is: ' + isMatch);
No comments:
Post a Comment