Forum Discussion
Getting stats for emails delivered with blank subject lines
- Mar 20, 2018
Search-Mailbox will not work, at least I wasn't able to get it to work when I toyed with this last time. But for message trace, something like this should do it:
Get-MessageTrace -StartDate "02/20/2018" -EndDate "03/20/2018" | Select-Object Received, SenderAddress, RecipientAddress, Subject, Status, ToIP, FromIP | Where {!$_.subject}You should also be able to use
where ($_.Subject -eq $null)
Search-Mailbox will not work, at least I wasn't able to get it to work when I toyed with this last time. But for message trace, something like this should do it:
Get-MessageTrace -StartDate "02/20/2018" -EndDate "03/20/2018" | Select-Object Received, SenderAddress, RecipientAddress, Subject, Status, ToIP, FromIP | Where {!$_.subject}
You should also be able to use
where ($_.Subject -eq $null)
I also discovered another way to get this report...
In Office 365 - Security & Compliance - Reports - Dashboard. Click on the dashboard for "Spam Detections". There is a column for "Subject" - you can see emails sent to the company that have blank subject lines. Unfortunately, the dashboard does not allow a filter for subject lines. I downloaded the report for 30 days and filtered the CSV file on the "Subject" column for the ones that are blank.