Skip to content

Instantly share code, notes, and snippets.

View pepdiz's full-sized avatar

Pep pepdiz

View GitHub Profile
@pepdiz
pepdiz / purgeGmail
Last active July 23, 2017 15:18
Delete gmail emails which matches filter
function purgeMail() {
var GMAIL_LABELS = "label1, label2, label3";
var PURGE_SIZE = 0
var PURGE_DATE = "2010-01-01"
GmailApp.moveThreadsToTrash(
GmailApp.search(GMAIL_LABELS
.split(',')
.map(function (e) {return "label:" + e.trim();})

Keybase proof

I hereby claim:

  • I am pepdiz on github.
  • I am pepdiz (https://keybase.io/pepdiz) on keybase.
  • I have a public key ASDFbT3snKfmvBcW0zSTsnnFNd6rzM7BSMZo-fOj5KuUUwo

To claim this, I am signing this object: