Create Outlook email draft using PowerShell

Based on the other answers, I have trimmed down the code a bit and use

$ol = New-Object -comObject Outlook.Application

$mail = $ol.CreateItem(0)
$mail.Subject = "<subject>"
$mail.Body = "<body>"
$mail.save()

$inspector = $mail.GetInspector
$inspector.Display()

This removes the unnecessary step of retrieving the mail from the drafts folder. Incidentally, it also removes an error that occurred in Shay Levy’s code when two draft emails had the same subject.

Leave a Comment