FAQ

Is CMail free?

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 acknowledgements in ThirdParty.txt (SSL-enabled version only at present) are preserved.

We are aware of similar tools that cost between $US35 and $US299 for a single license, yet have a fraction of the functionality that CMail provides for free. We appreciate donations and ask you to consider using our referral links if you need a quality SMTP relay service, as the small amount we receive fom this helps pay for hosting costs. A message telling us how you are using the software or simply recommending it to others is also appreciated, as CMail is maintained for the benefit of users just like you.

How do I install CMail?

No installation is required. Common settings such as the hostname of your SMTP server can be specified in %APPDATA%\cmail.conf so they don’t need to be provided every time CMail is run.

Is there a portable version of CMail/CMailGUI?

CMail is portable. It will not write any configuration to file or the registry, but it will access configuration files if they exist.

CMailGUI does store its configuration on disk. It can be made fully portable by simply creating a blank file named cmailgui.json in the same directory as cmailgui.exe. CMailGUI stores all its configuration and profile data in that file.

Is there a DLL version of CMail?

There is no plan to release a DLL verison (CMailLib). CMail can easily be invoked from within other applications, with its configuration set via stdin and results provided via stderr and exit codes. Optionally, detailed information regarding the connection, e-mail delivery and the status of individual recipients can be output to file or stdout in JSON format. We believe this approach represents the best compromise, exposing all of CMail’s functionality, without creating additional support requests to fix other people’s code. As an example, CMailGUI uses CMail’s command line interface exclusively.

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?

To send to GMail, use the -starttls option and send to port 587 (preferred), or use the -smtps option. You must either use the App Password feature (recommended) or provide your own OAUTHBEARER token.

Does CMail support OAuth2?

Yes, sort of. CMail supports OAuth2 authentication if the user provides an access token in place of a password and uses the -oauth setting. Builds with preliminary support for OAuth2 token exchange are available here. We strongly suggest signing up with a dedicated SMTP provider such as SMTP2Go or AhaSend, instead of using OAuth2 as there are many pitfalls that come along with doing so. See our current Recommended SMTP Providers.

If you are a Google user, you can continue to use their SMTP services by enabling the App Password feature as an alternative to OAuth2.

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 less than 100, and 666 may be returned in the unlikely event of memory allocation failure.

CMail 0.8.9 and later can also output detailed information in JSON format by adding -results:filename.json.

{
  "subject": "And so it goes.",
  "date": "Date: Tue, 05 Sep 2023 00:48:40 GMT",
  "from": "user@example.com",
  "host": {
    "hostname": "172.16.0.4",
    "ip": "172.16.0.4",
    "port": 25,
    "protocol": "ESMTP"
  },
  "recipients": [
    {
      "e-mail": "user@example.com",
      "status": "accepted"
    }
  ],
  "message-id": "<Cq7EyAMAFRs46OoY@example.com>",
  "status": "success",
  "smtp response": "250 2.0.0 6d3aa300 Message accepted for delivery"
}

Does CMail support TLS 1.3 (or TLS 1.2)?

Yes. CMail uses the default LibreSSL build options, which include support for TLS 1.3.

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.

Can I use CMail to send MHTML messages generated by SSRS (SQL Server Reporting Services)?

MTHML is essentially an e-mail message, so you can send these as using CMail’s preconstructed mode. Use -emailfile:filename.mhtml to specify the MHTML document instead of -body and -body-html. You will still need to provide -to and -from values as they are absent from the MHTML.

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.


©2024 Inveigle.net
HOME | PRIVACY | CONTACT