CLI Usage¶
Send emails directly from the terminal with the fluxmail command.
Run fluxmail --help for full usage with formatted output.
Flags¶
| Flag | Required | Default | Description |
|---|---|---|---|
--type |
Yes | — | Email protocol: smtp or outlook |
--host |
Yes | — | SMTP relay hostname (e.g. smtp.gmail.com) or relay:domain pair (e.g. smtp.gmail.com:gmail.com) |
--subject |
Yes | — | Email subject line |
--recipients |
Yes | — | Recipient address. Repeat flag for multiple. |
--body |
No* | — | Email body — plain text or HTML string |
--body-file |
No* | — | Path to a file to use as the email body. Mutually exclusive with --body. |
--sender |
No | username (if valid email) | Sender address (SMTP only) |
--cc |
No | — | CC address. Repeat flag for multiple. |
--bcc |
No | — | BCC address. Repeat flag for multiple. |
--reply-to |
No | — | Reply-To address (SMTP only) |
--attachments |
No | — | File path to attach. Repeat flag for multiple. |
--html / --no-html |
No | --no-html |
Treat body as HTML |
--dry-run |
No | off | Preview the email without sending |
--port |
No | 25 |
SMTP port. Use 587 for STARTTLS. |
--username |
No | $FLUXMAIL_USERNAME |
SMTP login username. When this is a valid email it also sets the default sender. |
--password |
No | $FLUXMAIL_PASSWORD |
SMTP login password (hidden in prompts) |
--tls / --no-tls |
No | --no-tls |
Enable STARTTLS (port 587). Mutually exclusive with --ssl. |
--ssl / --no-ssl |
No | --no-ssl |
Use implicit TLS (port 465). Mutually exclusive with --tls. |
--timeout |
No | 30 |
SMTP connection timeout in seconds |
--max-retries |
No | 0 |
Number of send retries on failure |
--retry-delay |
No | 1.0 |
Seconds to wait between retries |
--version |
No | — | Print version and exit |
*Exactly one of --body or --body-file is required.
Examples¶
Some providers require implicit TLS on port 465 instead of STARTTLS on port 587.
Use --ssl instead of --tls in that case:
Credentials in shell history
Prefer FLUXMAIL_USERNAME / FLUXMAIL_PASSWORD environment variables over
the --username / --password flags. Inline flags appear in shell history
and ps output, making them unsuitable for shared or production systems.