Hi,
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, "
$mail.Save()
$inspector = $mail.GetInspector
$inspector.Display()
Struggled with that one, this worked for me.
Although is doesnt look very nice…
$text="hi guys"
$temp=$mail.body
$mail.htmlbody=get-content $env:appdata\Microsoft\Signatures\*.htm
$mail.body= $text +$mail.body + $temp
Thank you both,
and what about outlook template file .oft, how i can open it?
Thanks.
just one more, how i can show signature image
Thanks.