(S)MTP mode is the default and is used when CMail is both constructing and sending an e-mail.
(F)ile mode can be used to construct an e-mail message for subsequent delivery via either CMail or another application.
(P)reconstructed e-mail mode is used to send e-mails constructed using File mode or another application.
Not all settings can be used with each mode. E.g., Settings labelled SF- apply only to SMTP and File modes.
CMail applies configuration options from a default configuration file, a command line specified configuration file, and from the command line itself, in that order. Settings for which multiple values can be assigned (E.g., -to) are ADDED from each configuration. For settings that can only be specified once, the last occurrence will be used. I.e. You can specify a default configuration in cmail.conf, and override settings for individual messages by specifying another config file, or via the command line.
Command line parameters will undergo code page conversion, unless -clutf8 is specified. Configuration files are assumed to be UTF-8 or ASCII.
The default configuration is stored in %APPDATA%\cmail.conf.
Configuration files must contain one setting per line, and do not include the '-' prefix. A '#' may be used to comment out a line.
Specifies the SMTP server to be used to deliver the message. A username and password may optionally be specified for SMTP authentication. If user credentials are supplied, implies -starttls if authentication is not offered prior to STARTTLS.
Enables (F)ile mode and specifies a filename to output the e-mail to.
Enables (P)reconstructed e-mail mode and specifies a file containing a preconstructed e-mail for delivery via SMTP.
Specifies the e-mail address, with optional alias, to appear in the 'From' header of the message. This setting is required for SMTP and File modes. In Preconstructed mode, the 'From' header will be used if this setting is omitted.
Adds a recipient in the 'To' field of the message or specifies the name of a file containing a list of recipients. This setting may be specified multiple times. See 'Recipient Management' for more information.
-cc:address[:alias[:DSN]] | @file
As above, for CC recipients.
-bcc:address[::DSN] | @file
As above, for BCC recipients.
Specifies the e-mail address to which replies should be sent.
Attach the specified file. CMail will select base64 or quoted-printable encoding automatically. Files containing >85% ASCII text in the first 4kB will be quoted-printable encoded. Attachments of type message/* will use 7-bit transfer encoding for RFC compliance.
Attach the specified file using base64 encoding. Attachments of type message/* will be identified as text/plain.
Attach the specified file using quoted-printable encoding. Attachments of type message/* will be identified as text/plain.
Attach the specified file as an inline (multipart/related) attachment, usually used for images referenced in a HTML message body. The Content-ID is the file name, URL encoded where applicable. This value is case-sensitive. Requires -body-html.
Attach the specified file using uuencoding. These attachments are encoded within the message body.
Attach multiple files matching one or more patterns. See 'Wildcard Attachments' below.
Specifies the default DSN types to request if no DSN settings are specified for the recipient, using the first letter of each DSN type. Acceptable values are (S)uccess, (F)ailure, (D)elay, and (N)ever. E.g., -dsn:SFD will request a DSN for success, failure and delay. If (N)ever is included in the list, it will take precedence over all other values.
Sets the envelope ID for DSN requests. If not set, a random ID will be used.
A comma-separated list of authentication types which may be used with the upstream server. Supported values are CRAM-MD5, PLAIN, and LOGIN.
Use the specified hostname in HELO/EHLO.
Connect via a proxy. Authentication is only supported for HTTPS proxies.
Specify the type of proxy being connected to. Supported proxy types are SOCKS (default proxy type, default port 1080), and HTTPS (default port 8080).
Require TLS be used for mail delivery. Implies -starttls.
Attempt to use TLS if STARTTLS is advertised in response to EHLO.
Specifies that the port being connected to uses SMTPS (SSL/TLS without STARTTLS). This setting changes the default port to 465. This method of securing mail transfer is deprecated, use -starttls if the target server supports that method.
The -to, -cc, and -bcc settings each add either a recipient to the message or a list of recipients from file.
When adding individual recipients, the first parameter is required and specifies an e-mail address. The second parameter can be used to specify an alias, usually the name of the recipient. The alias may be quoted (using double quotes, escaped as necessary), although this is only required where a colon may be present in the alias. The final parameter specifies DSN options for the recipient, using the same format as the -dsn option documented above. E.g., -to:email@example.com:"Example User":DF. Where an alias is not desired (or not applicable in the case of BCC), this field may be left blank. E.g., -bcc:firstname.lastname@example.org::SFD.
When adding recipients from file, the file name must be prefixed with '@'. E.g., -to:@filename. The file should contain one e-mail address per line in either the form "User Alias <email@example.com>", specifying an address with an alias, or "firstname.lastname@example.org" specifying only an address, both without quotes.
When -emailfile is used, recipients will be determined by the To and Cc header fields of the preconstructed message if a recipient setting is not present. In all other cases, at least one recipient setting is required.
CMail supports adding multiple attachments from a source directory using patterns. Multiple patterns may be specified, separated by '/', and are evaluated from left to right. Patterns may include standard wildcard characters '*' or '?', and character sets and ranges , and may be prefixed with a logical NOT operator '!'. In addition to the patterns, a number of options are available to modify the behaviour.
Options (Case sensitive):
H - Include hidden files
S - Include system files
A - Include ONLY files with the Archive attribute set
R - Recursive (include files in subdirectories)
C - Case sensitive matching
U - Use uuencoding
6 - Use base64 encoding
Q - Use quoted-printable encoding
I - Create inline attachments for use with -body-html
E.g., To recursively include logs from 1970, but exclude any .tmp files, you could do the following -awild:R:c:\logs\1970*/!*.tmp