Snooze Your Gmail

What if a  mails comes from your boss that you have to submit something to him on such and such date,suppose mail comes  3or4 days before the decided date.Certainly there will be lots of new mail in your inbox in incoming days and there are  chances that you may forget about this mail..and you can be in trouble ....

But we have a solution for you...Snooze your mail for desired days ..here is the procedure....


1. Open Google doc.(click on create spreadsheet-> Tools -> Script editor)

Gmail Snooz

2.Paste the following code in given space.


var MARK_UNREAD = false;
var ADD_UNSNOOZED_LABEL = false;

function getLabelName(i) {
return "Snooze/Snooze " + i + " days";
}

function setup() {
// Create the labels we’ll need for snoozing
GmailApp.createLabel("Snooze");
for (var i = 1; i GmailApp.createLabel(getLabelName(i));
}
if (ADD_UNSNOOZED_LABEL) {
GmailApp.createLabel("Unsnoozed");
}
}

function moveSnoozes() {
var oldLabel, newLabel, page;
for (var i = 1; i 0) {
if (newLabel) {
// Move the threads into "today’s" label
newLabel.addToThreads(page);
}
else {
// Unless it’s time to unsnooze it
GmailApp.moveThreadsToInbox(page);
if (MARK_UNREAD) {
GmailApp.markThreadsUnread(page);
}
if (ADD_UNSNOOZED_LABEL) {
GmailApp.getUserLabelByName("Unsnoozed")
.addToThreads(page);
}
}
// Move the threads out of "yesterday’s" label
oldLabel.removeFromThreads(page);
}
}
}
}


3. Save and give it a name.

gmail snooz
4.From dropdown menu  select you function(in this case setup) and click on run button.gmail snoozingAbove process will ask you to authorize the script.

5.Now click on Triggers menu and choose "current script's trigger".

6.From the drop down menu choose as (Function->moveSnoozes  ,event->" Time-driven"," day timer " and "midnight to 1am").mail snooz 7. click save and give authorization to script. This will create label in your mailbox as Snooze with 7 sub menu.

label

8.To snooze a mail use "move to tool" to move to snooze for desired days.

0 comments:

Post a Comment