Forum Discussion

tcboeira's avatar
tcboeira
Brass Contributor
May 13, 2024
Solved

How to count messages sent from a specific mailbox

Good morning everyone! I hope everyone is well.   As always, I warn you that I don't speak the language so I can help myself by using an online translator. I hope you can make me understand. If no...
  • VasilMichev's avatar
    May 13, 2024
    Are you looking for messages sent during a specific time period or? The report in the admin center will give you this data for preset periods (30-180 days), and yes, it's generated with some delay, usually 2-3 days.
    If you want more up-to-date data, use the message trace:

    Get-MessageTrace -SenderAddress email address removed for privacy reasons

    The downside is that you can only cover limited time period with it, up to 10 days:

    Get-MessageTrace -SenderAddress email address removed for privacy reasons -StartDate (Get-Date).AddDays(-10) -EndDate (Get-Date)

    Another option would be to use the Graph API or EWS to fetch the content of the Sent Items folder for the mailbox. However, it's not mandatory for sent messages to be actually saved therein, so the results might not be what you expect.

Resources