I am creating a PowerShell script to automate the process at work. This process requires the email to be completed and sent to someone else. The email will always follow the same template, but probably never will be the same every time, so I want to create an email project in Outlook and open an email window so that additional data can be filled in before sending.
I did a bit of work on the Internet, but all I can find is a code to send emails. The code is as follows:
$ol = New-Object -comObject Outlook.Application
$mail = $ol.CreateItem(0)
$Mail.Recipients.Add("XXX@YYY.ZZZ")
$Mail.Subject = "PS1 Script TestMail"
$Mail.Body = "
Test Mail
"
$Mail.Send()
In short, does anyone know how to create and save a new Outlook email project and immediately open this project for editing?