Usually, some parameters are invariant over many email sending processes. Typically settings like FROM address and name, SMTP server, character set, user name and password stays the same. In such cases it is possible to create configuration text file that includes all such invariant parameters and specify this file after -CONFIG or -CFG switch, thus replacing the entire recurring part of command line.
febootimail -CONFIG "C:\My cmd mail\settings\parameters.txt"febootimail -CFG server.txt -CFG auth.txt -CFG C:\mail-cmd\settings.txt
When creating configuration text files to replace recurring command line parameters or for using it with multiple configuration sets, keep in mind some tricks:
- Use one command per line (the only exception is -USEFILE parameter which is treated as part of respective command).
- Excessive spaces and tabs will be trimmed when unnecessary.
- Message text paragraph formatting requires using multiple text blocks, separated by -CR or -ENTER parameters.
C:\>febootimail -TO mail@cmd.com -TEXT "Sending out cmd mail from DOS command line prompt using configuration file - other settings are taken from settings.txt file." -CONFIG settings.txt Possible content of settings.txt file, which is used to specify all email message parameters. Take a note on possibility to include reference to another configuration file that provides some other parameters.
# Main configuration file (settings.txt).
# Use one command per line.
# Spaces and tabs are allowed for command indent.
# Syntax: -COMMAND value
# Sender...
-FROM john@sender.com (John Sender)
-REPLYTO home@sender.com
# Email parameters...
-SUBJECT Quick cmd mail
-CHARSET ISO-8859-2
-CONFIRM
-ORG -USEFILE C:\My cmd mail settings\Organization.txt
# SMTP server settings...
# Settings are taken from another configuration file.
# Configuration files can be nested one into other.
-CONFIG server-and-auth.txt
# Email signature...
-CR
-TEXT Sincerely yours,
-CR
-TEXT John Sender Possible content of nested server-and-auth.txt file, which is used to specify SMTP email server, username and password, and authentication method:
# SMTP configuration file (server-and-auth.txt).
# Syntax: -COMMAND value
# SMTP server...
-SERVER outgoing.email.server.com
-PORT 25
# Authentication...
-AUTH LOGIN
-USER john475
-PASS 4f$sKp5%i
# Security...
# If your server supports SSL, uncomment next line.
# -SSL Please do not hesitate to contact our support department with any possible further questions or to solve practical issues connected with Command line email.