Frequently Asked Questions

Is CMail free? Are there any restrictions on use?

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 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, by piping the content of the file in to CMail or using -body-file (0.7.7 or later). See Examples.

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. Configuration errors will result in a value <100, and 666 may be returned for memory allocation failure.

How do I include inline images?

As of version 0.7.7, CMail includes support for inline attached files. Attach the file using -ai:filename, and use the URL format inside your HTML document (specified using -body-html). The domain portion is taken directly from the -from address. 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. It is the users reponsibility to ensure the file names, and therefore Content-IDs, are unique. Technically, the Content-ID is required to be globally unique, but that poses a bit of a problem when you need to know the ID you're referencing.

How do I report a bug or request a feature?

Please e-mail