Created
January 18, 2017 16:31
-
-
Save jivimberg/68cf688c74e116872bd6a0612c794f6e to your computer and use it in GitHub Desktop.
Google Apps Script to get notified about the number of unread emails in an inbox
This file contains 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
function unreadCount() { | |
var unreadCount = GmailApp.getInboxUnreadCount(); | |
var masterEmail = "<[email protected]>"; | |
var subject = "Your unread count"; | |
var message = "You have " + unreadCount + " emails" | |
MailApp.sendEmail(masterEmail, subject, message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment