To run JVMail from an environment where you cannot set the CLASSPATH environment, such as when run from an executable, batch files or scripts, the full command is:
JVMail uses command line arguments to allow external applications and scripts to specify details of the email that is to be sent. Detailed descriptions of all the available command line arguments are listed below.
Help:
-h or -? Displays a list of the command line switches, with a basic description.
Template Control
-c Displays the graphical console which allows the creation and editing of mail message templates. It also allows for the sending of messages from the menu.
-x[file path=""] Loads the defined message template file. The values defined here can be overridden by the data input switches.
Data Input:
-n[machine address=""] Sets the address of the outgoing SMTP server. *
-f[email address=""] Sets the originating email address.
-t[email address=""] Sets the recipient email address. */**
-s[text string=""] Sets the email message subject string.
-b[text string=""] Sets the email message main body.*
-p[file path=""] Loads the email mail message main body from the defined text file. *
-a[file path=""] Sets the files to be attached to the email message. **
* These values must be set.
** If multiple addresses are to be entered, a ; delimited string must be used. e.g. "test1@test.com;test2@test.com"
Configuration and Execution
To run JVMail from an environment where you cannot set the
CLASSPATHenvironment, such as when run from an executable, batch files or scripts, the full command is:java -cp JVMail.jar;Encoder.jar uk.org.xlevel.JVMail.JVMail [arguments]Command line arguments
JVMail uses command line arguments to allow external applications and scripts to specify details of the email that is to be sent. Detailed descriptions of all the available command line arguments are listed below.
Help:
-hor-?Displays a list of the command line switches, with a basic description.Template Control
-cDisplays the graphical console which allows the creation and editing of mail message templates. It also allows for the sending of messages from the menu.-x[file path=""]Loads the defined message template file. The values defined here can be overridden by the data input switches.Data Input:
-n[machine address=""]Sets the address of the outgoing SMTP server. *-f[email address=""]Sets the originating email address.-t[email address=""]Sets the recipient email address. */**-s[text string=""]Sets the email message subject string.-b[text string=""]Sets the email message main body.*-p[file path=""]Loads the email mail message main body from the defined text file. *-a[file path=""]Sets the files to be attached to the email message. *** These values must be set.
** If multiple addresses are to be entered, a ; delimited string must be used. e.g.
"test1@test.com;test2@test.com"Example
java JVMail -nsmtp.test.com -ffrom@test.com -tto@test.com -s"subject" -b"Message Body"