Create Outlook email draft using PowerShell

后端 未结 5 1663
清酒与你
清酒与你 2020-12-03 07:43

I\'m creating a PowerShell script to automate a process at work. This process requires an email to be filled in and sent to someone else. The email will always roughly fol

5条回答
  •  -上瘾入骨i
    2020-12-03 08:28

    if you want to use HTML template please use HTMLbody instead of Body , please find sample code below:

    $ol = New-Object -comObject Outlook.Application
    $mail = $ol.CreateItem(0)
    $mail.Subject = "Top demand apps-SOURCE CLARIFICATION"
    $mail.HTMLBody="Joseph"
    $mail.save()
    
    $inspector = $mail.GetInspector
    $inspector.Display()
    

提交回复
热议问题