Simon Garratt
Simon Garratt

Reputation: 11

gmail script to forward emails on a weekend

New to Gmail scripting been asked to set up for one of our users to forward emails she gets form a particular email address to the company director on a weekend so from Friday night 18:00 to Monday morning 07:00.

Company uses gmail for there emails so need a gmail script found a few online but nothing that does it for particular days and times.

Upvotes: 1

Views: 222

Answers (1)

MαπμQμαπkγVπ.0
MαπμQμαπkγVπ.0

Reputation: 6737

It is possible using triggers.

For example, using the code that was provided in sendEmail(to, replyTo, subject, body)

MailApp.sendEmail("[email protected]",
                   "[email protected]",
                   "TPS report status",
                   "What is the status of those TPS reports?");

From there, you are allowed to customized whom are the message coming from/to and schedule it on a specific date.

Then from Code.gs, edit > All your triggers, you will be able to set your triggers. See image below:

Triggers

Upvotes: 1

Related Questions