Friday, 18 January 2013

Gmail Auto Email Delete by Purge

I usually get about 100 Emails daily from unwanted sources. Many of them are Spam but they appear in mailbox. So i am bringing a way to delete older messages automatically to get rid of these Emails.

The Trash and the Spam folders already have this auto-purge property and old email messages in these labels are automatically deleted after a fixed period of time (30 days to be precise).

Auto-purging can help keep your mailbox clean and tidy

If you have created a rule in Gmail that archives all your newsletter subscriptions to a particular label, these unwanted messages will be there in your account until you manually delete them.But With auto-purging enabled, the older mails of a label are automatically removed from your mailbox.



How to Enable Auto-Purging in Gmail??

Gmail officially don't provide this facility to delete Email Message from a particular label but there’s a simple Google Script which will bring this Facility. This script basically monitors Email message which belong to a particular label in your Gmail account and delete those that which have exceed the retention time.

Here’s how you can get auto-purge to work inside your Gmail:

1) Open Google Script and choose File -> Make a copy to copy it into your Google Drive.
2)  Set the value of GMAIL_LABEL to the label that you wish to auto-purge and PURGE_AFTER are the number of days for which you to retain a message in Gmail.
3) Now Go to Run and than Initialize and grant the necessary permissions.
4)Again go to Run -> Install to install the auto-purge script.


That’s it. Exit the Google Script it will monitor on your emails and delete the messages automatically from the label chosen by you after the time selected by you.

And in Case you want to delete this script and don't want to use it than go to just open the same script in your Google Drive and choose Run and than Uninstall it.

Recommended Post Slide Out For Blogger