Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Using Powershell with EWS - cannot see sender email address

$
0
0

I'm using Powershell with EWS to connect sort through a massive emailbox. It seems that the email properties show only the From header, not the actual sender header for an email. (The nice name, vs the actual email)

$emailProps = New-Object Microsoft.Exchange.WebServices.Data.PropertySet ([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)
$emailProps.RequestedBodyType = "Text"
.
.
.
$inboxItems = $service.FindItems($inboxFolder.Id,$searchFilter,$itemView)

$inboxItems | %{

$email = [Microsoft.Exchange.WebServices.Data.EmailMessage]::Bind($service, $_.Id, $emailProps)

But how do I add actual email sender address to the $email variable. I've (obviously?) trimmed out a lot of unneeded code.

Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>