CMail is provided as-is, free of charge. It may be used for both personal or commercial purposes, and be distributed without restriction, provided the software remains unmodified. Please ensure any acknowlegements in ThirdParty.txt (SSL-enabled version only at present) are preserved.
How do I escape an @ in my username?CMail parses the hostname portion of the -host setting first, so no escaping is required.
How do I send e-mail using a GMail account?We recommend using a SMTP provider such as SMTP2Go instead of GMail (or Outlook).
To send to GMail, use the -starttls option and send to port 587 (preferred), or use the -secureport option. You must also authenticate, and either enable the Less secure apps setting on your Google account, or configure an App Password if using 2-step verification. Note, even with these settings, authentication and mail delivery are always secured by SSL. The username, password and port can all be specified as part of the -host setting, i.e. -host:username:password@hostname:port.
Can I use a text file for the message body?Yes. Message bodies may be read either from a file or pipe. See Examples.
How can I make CMail retry?Retry support is the most requested feature for CMail. CMail does not retry. If mail delivery fails, CMail returns appropriate error codes, allowing the calling script (or human) to decide how to handle the situation.
Does CMail use return/exit codes?CMail returns 0 on success. Where the remote server rejects mail for any reason, the return code will be the SMTP status code. A 4xx response from the server indicates a temporary failure and it may be appropriate to try resending the message after a short delay. A 5xx response should be considered a fatal error and you should not retry. Configuration or connection errors will result in a value <100, and 666 may be returned in the unlikely event of memory allocation failure.
How do I include inline images?CMail includes support for inline attached files. Attach the file using -ai:filename, and use the URL format cid:filename inside your HTML document (specified using -body-html). If the file name contains any characters that are not valid in a URL, it must be URL encoded using lowercase hex digits. If in doubt, use -file or send a test message to determine the Content-ID from the message source. Non-ASCII file names should be avoided due to client incompatibility.
Why do I see "Invalid awild option 'c'"?The drive letter is being interpreted as an option for the -awild setting. This setting takes two parameters, the first is used to set various options such as recrusion and case sensitivity, while the second specifies the patterns to match. The solution is to include a second colon, specifying a blank first parameter, i.e. -awild::pattern.
How do I report a bug or request a feature?See the Contact page. Any custom builds will be from the development branch only and will target amd64 unless x86 is requested.