Created
May 27, 2013 20:43
-
-
Save confluencepoint/5658984 to your computer and use it in GitHub Desktop.
Löscht das Label "[Gmail]/Archive" in Google Mail (bei Verwendung von MailMate)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://developers.google.com/apps-script/understanding_triggers | |
Credits: http://stackoverflow.com/questions/11718674/how-to-catch-urlfetchapp-fetch-exception | |
Delete the label:"[Gmail]/Archive" in Gmail | |
http://blog.freron.com/2010/using-gmail-with-mailmate/ | |
There are other issues when accessing Gmail via IMAP, but the purpose | |
of this blog post is to simply state what I currently consider the | |
most sensible settings in MailMate for a Gmail account. Unfortunately | |
part of this means that you are not going to be able to access labels | |
within MailMate [...] | |
*/ | |
function cleanUpMailMateLabel() | |
{ | |
var label = GmailApp.getUserLabelByName("[Gmail]/Archive"); | |
try | |
{ | |
label.deleteLabel(); | |
} | |
catch (e) | |
{ | |
// Logger.log(e); | |
// Handle error e here | |
// Parse e to get the response code | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment