Author Posts

September 20, 2016 at 7:50 pm

Need help to add signature to email
my code:
$Outlook = New-Object -comObject Outlook.Application

$mail = $Outlook.CreateItem(0)
$mail.Subject = "TTT"
#$mailSign = Get-Content ($env:USERPROFILE + "\AppData\Roaming\Microsoft\Signatures\*.html")
$mail.Body = "Hi, "


$inspector = $mail.GetInspector

September 20, 2016 at 9:30 pm

Struggled with that one, this worked for me.
Although is doesnt look very nice...

$text="hi guys"
$mail.htmlbody=get-content $env:appdata\Microsoft\Signatures\*.htm
$mail.body= $text +$mail.body + $temp

September 21, 2016 at 1:19 am

Thank you both,
and what about outlook template file .oft, how i can open it?

September 21, 2016 at 12:33 pm

just one more, how i can show signature image