Email

  1. Home
  2. Computing & Technology
  3. Email

How to Create a Message in Windows Mail or Outlook Express from the Command Line

By Heinz Tschabitscher, About.com

What could be easier than starting a new messages in 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 Outlook Express showing, or if you want to create messages in Windows Mail or Outlook Express 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 Mail or Outlook Express from the Command Line

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

  • 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 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: "recipient@example.com" by default with a Subject: of "Hello" and a body of "Hi there", the URL would be "mailto:recipient@example.com?subject=Hello&body=Hi%20there", 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 '"C:\Program Files\Outlook Express\msimn" /mailurl:mailto:"recipient@example.com?subject=Hello&body=Hi%20there' (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 Email Quick Tips

Explore Email

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Email

  1. Home
  2. Computing & Technology
  3. Email
  4. Email Programs A-Z
  5. Outlook Express
  6. Outlook Express Tips
  7. Shortcuts and Speed Boosts
  8. Outlook Express Hacks
  9. How to Create a Message in Windows Mail or Outlook Express from the Command Line - About Email

©2009 About.com, a part of The New York Times Company.

All rights reserved.