Outlook signature

Welcome Forums General PowerShell Q&A Outlook signature

This topic contains 4 replies, has 3 voices, and was last updated by

 
Participant
2 years, 1 month ago.

  • Author
    Posts
  • #54339

    Participant
    Points: 2
    Rank: Member

    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()

  • #54345

    Participant
    Points: 1
    Rank: Member

    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

  • #54346

    Participant
    Points: 158
    Helping Hand
    Rank: Participant
  • #54354

    Participant
    Points: 2
    Rank: Member

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

  • #54387

    Participant
    Points: 2
    Rank: Member

    just one more, how i can show signature image

    Thanks.

The topic ‘Outlook signature’ is closed to new replies.