You can use script below to expand {pam@constoso.com,bill@Company portal .com,jill@Company portal .com}:
$temps = Get-TransportService | Get-MessageTrackingLog -Sender User@domain.com -MessageSubject "test7/5" -EventId DELIVER
Foreach ($temp in $temps) {
$i = 0
while ($temp.Recipients[$i] -ne $null) {
Write-host $temp.EventID $temp.Sender $temp.MessageSubject $temp.Recipients[$i] $temp.Timestamp
$i++
}
}
By the way, Exchange Q&A forum doesn't support writing script according to needs so far. If you have more requirements about scripts, I suggest you open a ticket to Microsoft to get a more professional script.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.