The command-line tool MailSetupTool is used for basic mail transport configuration. This tool can be used only when WSO2 SOA Enablement Server is not running. Please see Mail for a brief description of the Mail transport in WSO2 SOA Enablement Server for Java.
To set up an output SMTP server named smtp.company.com, enter this command:
MailSetupTool --file ..\conf\clientconf.xml --oserver smtp://smtp.company.com
To send and receive one-way messages you must set up the following, in order:
Output SMTP server (smtp.company.com)
Return address (ssj@company.com)
Input POP server account (ssj@company.com) with password (changeit)
Set this transport to be preloaded, meaning that it loads and starts when WSO2 SOA Enablement Server is booted, with the following command:
MailSetupTool --file ..\conf\clientconf.xml --oserver smtp://smtp.company.com --ofrom ssj@company.com --iserver pop://ssj@company.com --ipassword changeit --preload
The previous examples were for setting up mail transport on the client side. The same can be done on the server side as in the examples above. Only replace ..\conf\clientconf.xml with ..\conf\serverconf.xml.
The general usage is:
MailSetupTool --file ..\conf\clientconf.xml (or serverconf.xml) [ options ]
A full listing of options follows:
Table 23. Options for MailSetupTool
Parameter --full-name -abbreviation | Description | Required? |
---|---|---|
--file configFile -f configFile | The configuration file (serverconf.xml for servers and clientconf.xml for clients) in which the mail transport is to be configured | Always |
--preload | Sets preloading of mail transport to true | Necessary for receiving one-way messages |
--notpreload | Sets preloading of mail transport to false | Optional |
--oserver URL -o URL | Output server (smtp), such as smtp://smtp.company.com. | Necessary for sending messages |
--ofrom emailAddress -o emailAddress | Return address for sent messages, such as wasp@company.com | Necessary for receiving messages |
--iserver URL -i URL | Input server (pop3), such as pop://wasp.company.com. | Necessary for receiving messages |
--ipassword password -p password | Input server access password | Necessary for receiving messages |
--version | Prints version of WSO2 SOA Enablement Server for Java to screen | N/A |
--help -h | Prints list of these options to screen | N/A |