|
Execute Softabar Command Line Email Client using: java -cp . LauncherBootstrap sclec <options> in SCLEC-1.7.1/bin-directory. Commands See all commands using -help option. Sending email Receiving email Monitoring directory Monitoring file Monitoring email Using email shell Using socket server Saving options Other options
Send email from a script or command line using -sendmail command. Required options for -sendmail are -smtpserver, -to and -from. These options send empty mail to recipient specified with -to option. Other options for -sendmail are: -smtppassword <password> SMTP server password. -smtpport <port> SMTP server port. -smtpserver <host name> SMTP server address. -smtpuser <user name> SMTP server user name. -attachment <file name> [,<file name>, ...] Comma separated list of attachment file names. -bcc <recipient> [,<recipient>, ...] Comma separated list of BCC addresses. -body <text> Mail body. -bodyfile <file name> Read mail body from a file. -cc <recipient> [,<recipient>, ...] Comma separated list of CC addresses. -csv <file name> Read mails from CSV file. Tab-separated file with fields (to, cc, bcc, subject, body, body file name). New line marks next mail. -from <sender> Sender email address. -fromname <name> Sender name. -header <name=value> [,<name=value>, ...] Add custom header in format headerName= headerValue. -html Send mail as HTML. -importance <importance> Set mail importance. Use one of HIGHEST, HIGH, NORMAL, LOW, LOWEST. -inlineimage <file name> [,<file name>, ...] Add inline images to email. Used with HTML mail. Specify inline images "<img src=' cid:<imageFileName>'>". -nolog Do not log mail. By default, sent emails are logged in sent-emails.txt file in log-directory. -replyto <reply address> Reply-to email address. -replytoname <name> Reply-to name. -subject <subject> Mail subject. -to <recipient> [,<recipient>, ...] Comma separated list of TO addresses. -zip Zip attachments before sending.
Some examples of using -sendmail can be seen using -examples sendmail command. Top Receive email using -readmail command. Required options are -pop3server, -pop3user and -pop3password. This command lists email (subject, sender and date) for specified user. Other options for -readmail are: -pop3password <password> POP3 server password. -pop3port <port> POP3 server port. -pop3server <host name> POP3 server address. -pop3user <user name> POP3 server user name. -colwidth <width> Column width (default 20). Used when listing mail. -delim <delimeter> Field delimiter when listing mail. -delete Delete mail. Use with -read option. -fwd <index> Forward mail with specified index. Use -sendmail options to specify SMTP server, recipient etc. -mailseparator When saving mail with -savemail option, include mails between START OF MESSAGE and END OF MESSAGE separators. -nodate Do not print date. Used when listing mail. -noheader Do not print header. Used when listing mail. -noindex Do not print index column. Used when listing mail. -nosender Do not print sender. Used when listing mail. -nosubject Do not print subject. Used when listing mail. -read <index> Read mail with specified index. -saveattachment <directory>Save mail attachments to specified directory. Use with -read option. -savemail <directory> Save mail to file named 'inbox' in specified directory. Use with -read option. -savemailfilename File name for saved emails. Default is 'inbox'. Use with -savemail option. -tosender Forward mail back to sender (reply). Use with -fwd option.
Note that -fwd and -fwd -tosender options require -sendmail options for sending mail. See Sending email above. Some examples of using -readmail can be seen using -examples readmail command. Top Monitor specified directory using -monitordir <directory> command. Default action is to send all files in the directory to recipient specified using -sendmail options (see Sending email above). Options for -monitordir are: -actionclass <class name> Custom class to execute when directory content changed. -interval <seconds> How often to check directory. Default 60 seconds. -nodelete Do not delete files in directory after sending. Use with caution, delete files manually as soon as possible.
See customization for instructions how to add a custom action using -actionclass option. Some examples of using -monitordir can be seen using -examples monitordir command. Top Monitor specified file(s) using -monitorfile <files> command. Default action is to send files when they change to recipient specified using -sendmail options (see Sending email above). Options for -monitorfile are: -actionclass <class name> Custom class to execute when directory content changed. -interval <seconds> How often to check directory. Default 60 seconds.
See customization for instructions how to add a custom action using -actionclass option. Some examples of using -monitorfile can be seen using -examples monitorfile command. Top Monitor specified email using using -monitoremail command, use -pop3 options to specify monitored email. Default action is to delete email from the server and save it locally to inbox-file. Forward and reply options use -sendmail options for sending mail. (see Sending email above). Options for -monitoremail are: -pop3password <password> POP3 server password. -pop3port <port> POP3 server port. -pop3server <host name> POP3 server address. -pop3user <user name> POP3 server user name. -actionclass <class name> Custom class to execute when email received. -forward Forward email. Use -sendmail options to set SMTP server, recipient and other parameters for sending mail. -interval <seconds> How often to check email. Default 60 seconds. -nodelete Do not delete email after receiving. Use with caution. -nosave Do not save email after receiving. -reply Reply email. Use -sendmail options to set SMTP server and other parameters for sending mail. -savedir <directory> Directory for saved emails.
See customization for instructions how to add a custom action using -actionclass option. Some examples of using -monitoremail can be seen using -examples monitoremail command. Top Email shell is started using -emailshell command. Email shell is used to remotely manage a server. You specify email address to monitor using -pop3 options and send an email to that address from your other email address (adminemail). When Softabar Command Line Email Client receives an admin email it executes commands specified in the mail body. Each command is separated by a new line and commands are executed from Softabar Command Line Email Client process (current directory is directory where you started Softabar Command Line Email Client). Sample command email body may include commands such as: ls -la tail -100 /server/logs/latest_log.log whoami
reply email has output of the above commands. Options for -emailshell are: -adminemail <email address>Administrator's email. Emails from this address may include valid commands. -cmdsubject <subject> Subject of email that contains commands. -interval <seconds> How often to check email. Default 60 seconds. -nodelete Do not delete command email after receiving. -save <directory> Save emails to specified directory.
-nodelete option does not delete command email. This means that mail commands are executed each time when the software checks mail box. -cmdsubject is a subject of the command mail. See -examples emailshell. Email shell is not a real shell, such as bash or ksh, since there is no user interaction. Please do not use email shell to execute commands that require user interaction, results would be undefined. Top Socket server command, -server, is used to publish functionality of Softabar Command Line Email Client to other computers via TCP socket. A server socket is opened in a specified port and anyone can access the Softabar Command Line Email Client using custom client or just basic telnet. Commands and options are the same even when you use Softabar Command Line Email Client remotely. Options for -server are: -password <password> Server password. -port <port number> Server port. Default port is 42424.
Each command sent to Softabar Command Line Email Client via socket server starts a new thread on the server machine. This enables to use single Softabar Command Line Email Client process to monitor many directories, files and email addresses. Socket server is available only with site and redistributable versions. You can save options to a file using -saveas command. This takes all options in current command and saves them to specified file. Saved options can then be used with option -optionsfile. As an example you may have following options for sending mail: -sendmail -smtpserver mailserver.com -smtpuser me -smtppassword pwd -from
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
You want to minimize typing so you type above options and include also -saveas mysendmail.options
Later when you want to send email using SMTP you just type following option: -optionsfile mysendmail.options <and then all the other options, subject, to, cc and others>
-smtpdebug displays SMTP communication between Softabar Command Line Email Client and SMTP server. -ssl enables SSL for SMTP or POP3 communication.
-silent does not print anything to system out. Top
|