Files
linux-configs/blink1/new-mail.ps1
Melissa Avery-Weir b5deea18d9 Fix if/else logic for pattern choice
In addition, overwrite existing file.
2013-12-10 11:30:19 -05:00

9 lines
333 B
PowerShell

$outlook = New-Object -com Outlook.Application
$inbox = $outlook.Session.GetDefaultFolder(6)
$stream = New-Object 'System.IO.StreamWriter' -ArgumentList "d:\blink-new-mail-temp.txt", $false
if ($inbox.UnReadItemCount -eq 0) {
$stream.WriteLine("#000000")
} else {
$stream.WriteLine("pattern: ""NewMail""")
}
$stream.close()