I've got a need to send email within PowerShell and have all the components except the sensitivity label. For example:
$Outlook = New-Object -ComObject Outlook.Application
$Mail = $Outlook.CreateItem(0)
$Mail.To = 'someone@co.com'
$Mail.Subject = 'Special subject'
$SigString=Get-Content "C:\Users\someone\AppData\Roaming\Microsoft\Signatures\sig.htm"
$Mail.HTMLBody = 'blah blah blah.'
$Mail.HTMLBody += $SigString
$Mail.Send()
Unfortunately when this runs I'm prompted for the sensitivity label. I thought "Sensitivity = "
might work and it does allow values 0
thru 3
but that doesn't help.
Is this possible to do?