Skip to content

EmailOS Echo Command Documentation ​

The mailos echo command sends a message to the email address MailOS resolves for the current directory. It is a self-send shortcut built on the same delivery path and flags as mailos send.

Basic Usage ​

bash
mailos echo --subject "Test" --body "Checking MailOS delivery"

Use --dry-run to preview the resolved sender and recipient without sending:

bash
mailos echo --subject "Test" --body "Checking MailOS delivery" --dry-run

Recipient Resolution ​

mailos echo fills --to automatically. It resolves the recipient in this order:

  1. MAILOS_FROM_EMAIL
  2. MAILOS_EMAIL_ADDRESS
  3. The nearest parent emailos.json or emailos.toml from_address or email_address
  4. The default MailOS account in the user's machine config, such as ~/.email/config.json

When mailos echo falls back to the default machine config, it also uses that account for sending.

Relationship to Send ​

mailos echo reuses the normal mailos send flags and delivery behavior. You can use send options such as:

bash
mailos echo --subject "Plain test" --body "Hello" --plain
mailos echo --subject "File test" --file message.md
mailos echo --subject "Preview" --body "Hello" --dry-run

mailos echo is intentionally for self-sends. If you need to send to another address, use mailos send --to recipient@example.com.

Useful Checks ​

Inspect the resolved project send identity:

bash
mailos whoami
mailos env

Confirm the message in the sent folder:

bash
mailos sent --number 5 --days 1 --save-markdown=false

Released under the MIT License.