Mailto 1.6 [A TRADUIRE]
Mailto is a simple FREE mailing utility used to send messages and/or attached files to a user or a given set of users. This program can be used as a CGI application or in batch scripts, called from inside other programs that may need to send mail, or just from the command line. The program has several command line switches, parameters with '[]' around them are optional.
The switches are as follows:
-U sender id - Who the mail is from. If this is not included
mailto will first try to use the network logon.
If that fails then it will use the name of the
machine as the sender.
example:
mailto -U sbeasley@yourdom.com -h mydom.com -D isdall@yourdom.com
-D user ids - People and groups to send to. Id's are appended
together with a ';'.
example: mailto -D isdall@yourdom.com -U sbeasley@yourdom.com -h village.com
-H smtp_host - Host to send mail from.
example: mailto -h mydom.com -U sbeasley@yourdom.com -D isdall@yourdom.com
[-CC user ids] - People and groups to send a CC to. Id's are appended
together with a ';'.
example: mailto -U sbeasley@yourdom.com -h mydom.com -D isdall@yourdom.com -CC jquser@infoave.com
[-BCC user ids] - People and groups to send a Bcc to. Id's are appended
together with a ';'.
example: mailto -U sbeasley@yourdom.com -h mydom.com -D isdall@yourdom.com -BCC jquser@infoave.com
[(-AT and/or -AB) file names] - Files to attach in message. To send more than one
file, just append the file name together with a ';'.
-AT is used for text type file, like, .txt, .c, .csv etc... any ascii format files.
-AB is for binary type files like, .doc, .wri, .xls, .zip etc... any
non ascii format files.
example: mailto -U sbeasley@yourdom.com -h mydom.com -D isdall@yourdom.com -AT c:windowswin.ini
[-R Return path] - This is used if you want the used to reply to a
different address than the -S switch has.
example: mailto -R sbeasley@yourdom.com -U CISMIGATION -h mydom -D jquser@yourdom.com
[-S subject ] - Subject of the message.
example: mailto -S "Hi!" -U sbeasley@yourdom.com -h mydom -D jquser@yourdom.com
[-M Message] - Body of message.
example: mailto -M "How's it going?" -U sbeasley@yourdom.com -h mydom -D jquser@yourdom.com
[-MF filename] - File to send as message body.
example: mailto -MF c:fileshello.txt -U sbeasley@yourdom.com -h mydom -D jquser@yourdom.com
[-C configfile] - Config file to pull command line switches from.
example: mailto -C mycfg.cfg
Mycfg.cfg would look like:
[MAILTO]
SMTPSERVER=village.com
SENDERID=jquser16@yourdom.com
TOIDS=jquser3@yourdom.com;theboss@coldmail.com
CCIDS=jquser2@infoave.com
BCCIDS=squser@yourdom.com
REPLYTO=jquser@yourdom.com
BINFILES=c:sourcewmail.zip;c:sourcemailto.zip
MESSAGE=Test the new changes.......
SUBJECT=A subject would be nice!
[-I Section Name] - Section to read from in config file.
example: mailto -C mycfg.cfg -I Mysect
Mycfg.cfg would look like:
[MYSECT]
SMTPSERVER=village.com
SENDERID=jquser16@yourdom.com
TOIDS=jquser3@yourdom.com;theboss@coldmail.com
CCIDS=jquser2@infoave.com
BCCIDS=squser@yourdom.com
REPLYTO=jquser@yourdom.com
TXTFILES=c:sourcewmail.ini;c:sourcemailto.c
MESSAGE=Test the new changes.......
SUBJECT=A subject would be nice!
[-N user id] Try a get a return receipt. (Notice the word “Try”)
[-debug] Prints out all of the params you put in.
CGI options.
Mailto has the ability to be run *AS* a CGI application. To enable this you need to have a file named 'mailto.cfg'. This file should be in the same directory as mailto.exe (usally the cgi-bin directory) and should have atleast the following section:
[MAILTO] CGIAPP=Yes
Setting the variable CGIAPP to 'Yes' let's mailto know that it will be running as a CGI application. By setting CGIAPP to 'No' or not having a 'mailto.cfg' file mailto then assumes it will be called on the command line or from another program. There are several reserved form field names used to communicate with mailto.
Reserved fields:
SECTION - This tells mailto what section to read from in the mailto.cfg file.
SECTION is a required field and should be placed in a "hidden" field
on the form.
example:
<INPUT TYPE="hidden" NAME="SECTION" VALUE="SENDMAIL">
SENDERID - This is used to tell the app, who is sending the message. This
field can be set via a hidden, or text form field or in the current
'SECTION' of the 'mailto.cfg' file.
TOIDS - This is used to tell the app, who the message is going to. This
field can be set via a hidden, or text form field or in the current
'SECTION' of the 'mailto.cfg' file.
CCIDS - This is used to tell the app, who the message is being Cc'ed to. This
field can be set via a hidden, or text form field or in the current
'SECTION' of the 'mailto.cfg' file.
BCCIDS - This is used to tell the app, who the message is being BCc'ed to.
This field can be set via a hidden, or text form field or in the
current 'SECTION' of the 'mailto.cfg' file.
SUBJECT - This is used to set the subject of the message. This field can be
set via a hidden, or text form field or in the current 'SECTION'
of the 'mailto.cfg' file.
MESSAGE - This is used to set the body of the message. This field can be set
via a hidden, or text form field or in the current 'SECTION' of the
'mailto.cfg' file.
MESSAGEFILE
field can be set via a hidden, or text form field or in the
current 'SECTION' of the 'mailto.cfg' file.
Any other user defined form fields will be appended to the message body in the following format:
FIELD_NAME, FIELD_VALUE_LENGTH FIELD_VAULE
. . .
NOTE: The field value can be multi-lined.
As I said, mailto is free and hope that everyone that uses it enjoys it. If you have any Questions, comments, or bug reports, send mailto:jscottb@infoave.com.