Reading MSG file from outlook via powershell .. how to get email address?
<p>Fairly simple script at the moment I simply need to get the recipients email address out of a msg file, apparently there's not an easy way to parse it in text so I've used the following code, but I only get a name such as 'Joe Smith' when reading the message not joe.smith@mydomain.com</p>

<p>Any ideas? </p>

<p>Thanks!</p>

<pre><code>$outlook = New-Object -comobject outlook.application
$msg = $outlook.CreateItemFromTemplate("c:\MyMessage.msg")
$msg | Select to
</code></pre>