Usually, many email parameters are static. Typically settings like a FROM address, a character set, an SMTP server, a username and password stays the same. In such cases it is possible to create a text file that includes all such parameters. Specify the configuration file after the CONFIG (or CFG) command, thus replacing the entire recurring part of the command line.
Command syntax
- febootimail -CONFIG "C:\My cmd mail\
parameters.txt" - febootimail -CFG server-auth.txt -CFG C:\mail-cmd\
settings.txt
Tips
When creating a configuration file, keep in mind some simple tips:
- Use one command per line. The only exception is the USEFILE argument which is treated as part of the respective command.
- Excessive spaces and tabs will be trimmed automatically. Use quotes to preserve whitespaces.
- Message text paragraph formatting requires using multiple text blocks, separated by CR or ENTER parameters.
febootimail -TO john@example.com -TEXT "Sending a mail using the configuration file. The settings.txt file contains all other parameters." -CONFIG settings.txt
An example content of the settings.txt file, which is used to specify all the email message parameters. Take a note on the possibility to include a 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@example.com (John Sender)
-REPLYTO office@example.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.local\Share\*.xls
-ATTACH \\server.local\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 the nested server-and-auth.txt file, which is used to specify an SMTP email server, a username and password, and an authentication method:
# SMTP configuration file (server-and-auth.txt).
# Syntax: -COMMAND value
# SMTP server...
-SERVER smtp.example.com
-PORT 465
# Authentication...
-AUTH AUTO
-USER john475
-PASS 4f$su#KpmmH5%i
# Security...
# If your server supports SSL, uncomment the next line.
# -SSL
Related commands
Quick look
- Quick start · start sending the CMD email in minutes
- Tips & Tricks · a few quick email tricks
- Email attachments · use simple wildcards or advanced file masks to attach multiple files
- Debug email client-server connection · use DEBUG and advanced DEBUGX commands
- Batch file & errorlevels · errorlevel values can be used in conditional processing
- Command Line Email parameters · see all email commands
Need help?
If you have any questions, please do not hesitate to contact our support team.