**********This file is best viewed with wordwrap turned OFF.**********

-----------------------------------------------MAKEMAIL V. 1.0------------------------------------------------
a commandline mailto email composer
Composes an email for your default email client.
by Brother Gabriel-Maire - December 2009

1. License and Disclaimer
2. Description
3. General Usage
4. Blank Entries
5. Loading the Body from a Text File
6. Examples
7. Other Commandline Usages
8. Notes for Batch Files

-------------------------------------1. LICENSE AND DISCLAIMER-------------------------------------------
Makemail.exe is free for you to use, abuse, sell, distribute or anything else 
you are interested in doing with it.  If you improve the code, however, I would
like a copy of that code (and please remove my email from the code)!  Thank you!
If you want to send a thank you mail or request the source, use this commandline:  
makemail.exe Thanks!
----------------------------------------------2. DESCRIPTION-------------------------------------------------------
Makemail.exe automatically converts all of the commandline information
into hex for you, that is, all except for carriage returns.  You can easily
send any kind of ascii character, such as &, %, *, ;, etc.

I tried to keep this instruction as concise as I could without leaving out any details,
and I know that *I* hate reading ReadMe's,  but you really should skim over this file
in order to see how things work and don't work.

-----------------------------------------------3. GENERAL USAGE-------------------------------------------------
1.  Email addresses must be separated by commas, without spaces.
2.  There must be only ONE space between each parameter, i.e:
     a space between <email> <cc> <bcc> <subject> <body>
3.  To send a carriage return, you must swap each one with %0A%0D
      because you cannot send a carriage return to a commandline.
4.  If your subject is longer than one word, you must encase it in 
     quotation marks.    
5.  You cannot send %0A or %0D as text (such as in the message body)
     unless you import the body from a text file, otherwise these tokens will be 
     converted into carriage returns.  Sorry!  You can't have everything.      
6.  You CANNOT send quotation marks in the subject line.  This prevents
     makemail.exe from discerning the subject from the body.  You can,
     however, send all the quotation marks you like within the body.
7.  To add multiple email addresses to the <email> field or the <cc> or <bcc>
     fields, separate the emails with a comma (see examples below).
8.  You can only send 1755 characters as the body of the email, and that is after
     the body is converted to url code.  But Makemail will tell you how many characters
     long your attempted bod is, and how many you need to remove.

--------------------------------------------------4. BLANK ENTRIES--------------------------------------------------
You can create an email with no <email> and/or no <cc> and/or no <bcc> and/or
no <subject>.  Just fill the parameter with "none" or "0" or "nil"  (without the quotes),
but don't leave them out!  For a blank <body> don't put anything after the <subject>
parameter.

--------------------------------5. LOADING THE BODY FROM A TEXT FILE--------------------------------
If you have a complicated message, you may wish to load it from a text file.  This 
approach negates the need for you to send carriage returns to the commandline,
as Makemail.exe will know how to handle the text appropriately.  You can send
any characters this way.  Note that if the filename contains any spaces, you must 
enclose it within quotation marks.  

USAGE: (Note the spaces between parameters!)
makemail.exe <email> <cc> <bcc> <subject> <body>

<email> is an email address, such as somebody@somewhere.com
<cc> is an email address.
<bcc> is an email address.
<subject> If longer than one word, must be enclosed in quotation marks: "Some Subject"
<body> can be anything at all or nothing at all.

------------------------------------------------6. EXAMPLES---------------------------------------------------------
***Simple email:***
makemail.exe somebody@somewhere.com none none "Some Subject" And then the body is whatever is left on the commandline.

***3 Lines in the <body>***
makemail.exe someone@someplace.com none none "Hello there!" Line1%0A%0DLine2%0A%0DLine3

***multiple email addresses***
makemail.exe person1@someplace.com,person2@elsewhere.com,person3@here.com none none "The Subject in Quotes" And then the body is anything left after the space that follows the subject.

***email with bcc.***
makemail.exe tosomeone@loc.com none bccsomeone@loc.com "The Subject" Here is an email with a recipient and a blind carbon copy.

***email with cc.***
makemail.exe tosomeone@loc.com ccsomeone@loc.com none "The Subject" Here is an email with a recipient and a carbon copy.

***email with recipient, cc and bcc***
makemail.exe tosomeone@loc.com ccsomeone@loc.com bccsomeone@loc.com "Some Subject" Here is an email with recipient, cc and bcc.

***totally blank email***
makemail.exe 0 0 0 0
makemail.exe none none none none
makemail.exe nil nil nil nil

***email with multiple bcc only***
makemail.exe none none bcc1@loc.com,bcc2@loc.com,bcc3@loc.com,bcc4@loc.com "Some Subject" An email with multiple blind carbon copies

***email with one word as the subject
makemail.exe tosomeone@loc.com none none OneWordAsSubject You must remember to put quotes around the subject if you put spaces it it.

***email which loads the contents of a text file as the body***
makemail.exe tosomeone@loc.com 0 0 "The Subject" C:\somefolder\somefolder\somefile.txt

***email which loads the contents of a text file as the body, but has spaces in the filename***
makemail.exe tosomeone@loc.com none none none "C:\some folder\some folder\some file.txt"

***email with no recipients, no subject, and the contents of a text file for the body***
(note that you cannot import ReadMe.txt because it is too long, but the commandline will tell you how many characters to remove.
makemail.exe 0 0 0 0 ReadMe.txt

----------------------------------7. OTHER COMMANDLINE USAGES-------------------------------------
***Create thank you mail to the authour***
makemail.exe Thanks!
makemail.exe thanks!

***Open this ReadMe file***
makemail.exe Help!
makemail.exe help!

***View the commanline help***
makemail.exe ?
makemail.exe /?
makemail.exe help
makemail.exe

--------------------------------8. NOTES WHEN USING MAKEMAIL WITH BATCH FILES--------------------------
Batch Files have a few special requirements for particular characters.  All of the regular commanline
rules above apply, but make note of the following as well:

1.  Every single instance of a % must be replaced by %%
    If you don't do this, Batch thinks you are using a Batch variable.
    Batch File Code Example:  makemail.exe 0 0 0 0 a carriage %%0%%A Return
    
2.  An ampersand must be "escaped" with a caret ( ^ )   
    But you don't have to escape an ampersand in the <subject> if it inside quotation marks.
    Batch File Code Example:  makemail.exe 0 0 0 0 This line has an ^& in the body text.
    Batch File CodeExample:  makemail.exe nobody@nowhere.com 0 0 "Batch & Email Example" This line has an ^& in the text. And %%0A%%0D a carriage return too.


For more information on the mailto command and batch files, you might visit: http://www.robvanderwoude.com/email.php
But Makemail takes care of all that encoding for you.









