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
| function countEmails() { | |
| const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
| sheet.clear(); // Clear the sheet before writing new data | |
| sheet.appendRow(["Total Emails", "HTML Emails", "Text Emails", "[if (mso) in HTML"]); | |
| // Fetch emails from the Inbox | |
| const threads = GmailApp.getInboxThreads(); | |
| let totalEmails = 0; | |
| let htmlEmails = 0; | |
| let ifMsoEmails = 0; |
OlderNewer