Usually, many email parameters are static. Typically settings like FROM address, character set, SMTP server, user name and password stays the same. In such cases it is possible to create text file that includes all such parameters. Specify configuration file after -CONFIG or -CFG command, thus replacing the entire recurring part of command line.
febootimail -CONFIG "C:\My cmd mail\parameters.txt"
febootimail -CFG server.txt -CFG auth.txt -CFG C:\mail-cmd\settings.txt
When creating configuration file, keep in mind some simple tips:
C:\>febootimail -TO mail@example.com -TEXT "Sending cmd mail from command prompt using configuration file. Other params 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 more parameters.
# Main configuration file (settings.txt).
# Empty lines and lines starting with a hash symbol are ignored.
# Spaces and tabs are allowed for command indent.
# Use one command per line.
# Syntax: -COMMAND value
# -COMMAND -USEFILE c:\path to\filename.txt
# Sender...
-FROM john@sender.com (John Sender)
-REPLYTO home@sender.com
# Email parameters...
-SUBJECT Quick email
-CHARSET UTF-8
-CONFIRM
-ORG -USEFILE C:\My mail settings\Organization.txt
# Attaching all Excel files from the network share.
# Ignore any possible errors for attachments.
-ATTACH \\server\share\*.xls
-ATTACH \\server\share\summary.doc
-IGNOREATTACHERRORS
# SMTP server settings...
# Settings are taken from another configuration file.
# Configuration files can be nested one into another.
-CONFIG server-and-auth.txt
# Email signature...
-ENTER
-TEXT Sincerely yours,
-ENTER
-TEXT John Sender
# Help on all supported email commands...
# www.febooti.com/products/command-line-email/commands/
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 smtp.example.com
-PORT 25
# Authentication...
-AUTH AUTO
-USER john475
-PASS 4f$sKp5%i
# Security...
# If your server supports SSL, uncomment next line.
# -SSL
If you have any questions, please do not hesitate to contact our support team.