我们希望能够根据来自网络设备中不同的管理系统发送的电子邮件自动执行操作。
我尝试了这个小脚本,但它只列出了邮件主题,而没有正文内容。
# load rss-feed
$webclient = new-object System.Net.WebClient
# access the rss-feed
$webclient.Credentials = new-object System.Net.NetworkCredential ("scominbox@domain", "Password")
# download the rss as xml
[xml]$xml= $webclient.DownloadString("https://mail.google.com/mail/feed/atom")
# display only sender name and message title as custom table
$format= @{Expression={$_.title};Label="Title"},@{Expression={$_.author.name};Label="Author"}
# display the table
$xml.feed.entry | format-table $format
我该如何阅读电子邮件?