How to get daywise mail count in gmail

There are a few ways to get day-wise mail count in Gmail:

Method 1: Using Gmail's built-in feature

  1. Log in to your Gmail account.
  2. Click on the gear icon () in the upper right corner and select "See all settings."
  3. Go to the "General" tab.
  4. Scroll down to the "Mail settings" section.
  5. Click on the "Show day-wise mail count" checkbox.
  6. Click "Save Changes."

Now, you should see the day-wise mail count in the top right corner of your Gmail inbox.

Method 2: Using a browser extension

  1. Install the "Gmail Daywise Mail Count" browser extension from the Chrome Web Store (or equivalent for your browser).
  2. Once installed, click on the extension's icon in the top right corner of your browser.
  3. You should see the day-wise mail count displayed.

Method 3: Using a third-party add-on

  1. Install the "Gmail Daywise Mail Count" add-on from the Google Workspace Marketplace (formerly G Suite Marketplace).
  2. Once installed, click on the add-on's icon in the top right corner of your Gmail inbox.
  3. You should see the day-wise mail count displayed.

Method 4: Using a script

  1. Install the "Gmail Daywise Mail Count" script from the Google Apps Script library.
  2. Create a new script in your Gmail account by going to the "Triggers" page and clicking on "Create trigger."
  3. Set up the trigger to run at a specific time each day (e.g., every morning).
  4. The script will send you an email with the day-wise mail count.

Here's an example script:

function getDaywiseMailCount() {
  var today = new Date();
  var yesterday = new Date(today.getTime() - 86400000);
  var mailCount = 0;

  var threads = GmailApp.searchThreads("in:inbox after:" + yesterday);
  for (var i = 0; i < threads.length; i++) {
    mailCount += threads[i].getMessages().length;
  }

  MailApp.sendEmail("[email protected]", "Day-wise Mail Count", "Today: " + mailCount);
}

Note: These methods may have some limitations or requirements, such as requiring a Google Workspace account or having a specific browser or device.