Create a Message in Windows Mail from the Command Line

Large cursor over speech bubble on computer monitor
Marcus Butt / Getty Images

What could be easier than starting a new messages in Windows Live Mail, Windows Mail or Outlook Express? All it takes is a click on the Create Mail button.

But what if you fancy starting a new message from a command prompt, possibly without the main window of Windows Live Mail, Windows Mail or Outlook Express showing, or if you want to create messages programmatically from other applications?

Both can be accomplished with command line arguments.

You can create a simple message, but you can also specify default recipients as well as a default subject and message text.

Create a Message in Windows Live Mail, Windows Mail or Outlook Express from the Command Line

To create a new email message in Windows Live Mail, Windows Mail or Outlook Express from the Windows command line:

  • For Windows Live Mail:
    • Type '"C:\Program Files\Windows Live\Mail\wlmail" /mailurl:%'.
  • For Windows Mail:
    • Type '"C:\Program Files\Windows Mail\WinMail" /mailurl:%'.
  • For Outlook Express:
    • Type '"C:\Program Files\Outlook Express\msimn" /mailurl:%'.
    • Make sure you do include the inner (double) but leave out the outer (single) quotation marks.
  • Hit Enter.

To create a message with default To:, Cc:, Bcc:, Subject and message body fields:

  • Type '"C:\Program Files\Windows Live\Mail\wlmail" /mailurl:%' (Windows Live Mail) '"C:\Program Files\Windows Mail\WinMail" /mailurl:%' (Windows Mail) or '"C:\Program Files\Outlook Express\msimn" /mailurl:' (Outlook Express).
  • Use the mailto URL encoder to construct a mailto: URL containing the desired default values.
    • For a message sent To: "" by default with a Subject: of "Hello" and a body of "Hi there", the URL would be "", for example.
  • Copy and paste the URL to the command line, appending it immediately after "mailurl:".
  • Enter a quotation mark '"' between "mailto:" and the email address of the default recipient.
    • The full command line using the above example is, using Windows Live Mail, '"C:\Program Files\Windows Live\Mail\wlmail" /mailurl:mailto:"' (again including the inner but not including the outermost quotation marks).

Note that you cannot attach files from the command line or have the message delivered automatically. For that, you can try a tool such as Blat, however.

More From Us