OLEXP: How to Send Outlook Express Mail from a Command Line (192341)



The information in this article applies to:

  • Microsoft Outlook Express 5.0 for Windows NT 4.0
  • Microsoft Outlook Express 4.01 for Windows NT 4.0
  • Microsoft Outlook Express 4.0 for Windows NT 4.0
  • Microsoft Outlook Express 5.0 for Windows 98
  • Microsoft Outlook Express 5.0 for Windows 95
  • Microsoft Outlook Express 4.01 for Windows 95
  • Microsoft Outlook Express 4.0 for Windows 95
  • the operating system: Microsoft Windows 98

This article was previously published under Q192341

SUMMARY

This article describes how to create a preformatted and preaddressed e-mail message in which the following fields are automatically populated with information you specify:

  • To
  • Cc
  • Bcc
  • Subject
  • Body
To perform this operation, Outlook Express must be your default mail client.

MORE INFORMATION

To create a preformatted and preaddressed e-mail message, use the following command line

mailto:<to e-mail>?cc=<cc email>&bcc=<bcc mail>&subject=<subject text>&body=<body text>

where the following variable definitions apply:
   Variable      Field entry
   -------------------------------------------------------
   <to e-mail>   e-mail address to appear in the To field
   <cc mail>     e-mail address to appear in the CC field
   <bcc mail>    e-mail address to appear in the BCC field
   <subject>     text to appear in the Subject field
   <body text>   text to appear in the body of the message
				
Note the position of the question mark and ampersands in the command-line syntax.

Special Formatting

You must use ASCII hexadecimal equivalents as variables for punctuation characters. The following variables are used to represent commonly used characters:
   Punctuation             Hexadecimal equivalent
   ----------------------------------------------
   Space ( )               %20
   Comma (,)               %2C
   Question mark (?)       %3F
   Period (.)              %2E
   Exclamation point (!)   %21
   Colon (:)               %3A
   Semicolon (;)           %3B
   Line feed               %0A
   Line break (ENTER key)  %0D
				
For example, the command line

&subject=Hello%20World%21&body=How%20are%20you%2C%20John%3F

yields the following message:

Subject: Hello World!
Body : How are you, John?

Uses of the Command-Line String

You can use this command-line string:

  • In the Open dialog box when you click Start, and then click Run.
  • In a properties of a desktop shortcut.
  • In the Microsoft Internet Explorer 4.0 or 4.01 Address box.
  • In the body of an Outlook Express e-mail message.
  • In the HTML code of a Web page.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbhowto KB192341