Files
skills/public/message-composition.md
zeekay fec2bdf0d1 The skills index lists a skill only when the site serves it whole; the build drops pages with no source
site.py now lists a SKILL.md under skills/ only when /<name>.md is that
file byte for byte and every file it points at by a relative path
(references/, scripts/, templates/, tools/, a sibling page) is published.
120 entries pointed at files the site does not serve, reference docs were
listed as skills, and 18 names served another file. 188 skills remain.
tests/discovery.py holds the published index to the same rule.

build.py deletes every page it did not write, except the hand-written
pages in KEEP, walks skills/ in name order so a shared name resolves the
same on every filesystem, and refuses to run without HIPS_DIR. Rebuilt
against hanzoai/hips main: the 40 discover-* pages and 20 HIPs whose
source is gone are removed, the stale code-review, engineering-code-review
and ml pages match their source, and 66 pages that were never built (60
skills among them) and 4 new HIPs are published. .gitignore anchors the root symlinks, so public/gemini.md is
not ignored on a case-insensitive checkout.
2026-10-29 21:28:54 -07:00

3.7 KiB

Message Composition with MML (MIME Meta Language)

Himalaya uses MML for composing emails. MML is a simple XML-based syntax that compiles to MIME messages.

Basic Message Structure

An email message is a list of headers followed by a body, separated by a blank line:

From: [email protected]
To: [email protected]
Subject: Hello World

This is the message body.

Headers

Common headers:

  • From: Sender address
  • To: Primary recipient(s)
  • Cc: Carbon copy recipients
  • Bcc: Blind carbon copy recipients
  • Subject: Message subject
  • Reply-To: Address for replies (if different from From)
  • In-Reply-To: Message ID being replied to

Address Formats

Plain Text Body

Simple plain text email:

From: alice@localhost
To: bob@localhost
Subject: Plain Text Example

Hello, this is a plain text email.
No special formatting needed.

Best,
Alice

MML for Rich Emails

Multipart Messages

Alternative text/html parts:

From: alice@localhost
To: bob@localhost
Subject: Multipart Example

<#multipart type=alternative>
This is the plain text version.
<#part type=text/html>
<html><body><h1>This is the HTML version</h1></body></html>
<#/multipart>

Attachments

Attach a file:

From: alice@localhost
To: bob@localhost
Subject: With Attachment

Here is the document you requested.

<#part filename=/path/to/document.pdf><#/part>

Attachment with custom name:

<#part filename=/path/to/file.pdf name=report.pdf><#/part>

Multiple attachments:

<#part filename=/path/to/doc1.pdf><#/part>
<#part filename=/path/to/doc2.pdf><#/part>

Inline Images

Embed an image inline:

From: alice@localhost
To: bob@localhost
Subject: Inline Image

<#multipart type=related>
<#part type=text/html>
<html><body>
<p>Check out this image:</p>
<img src="cid:image1">
</body></html>
<#part disposition=inline id=image1 filename=/path/to/image.png><#/part>
<#/multipart>

Mixed Content (Text + Attachments)

From: alice@localhost
To: bob@localhost
Subject: Mixed Content

<#multipart type=mixed>
<#part type=text/plain>
Please find the attached files.

Best,
Alice
<#part filename=/path/to/file1.pdf><#/part>
<#part filename=/path/to/file2.zip><#/part>
<#/multipart>

MML Tag Reference

<#multipart>

Groups multiple parts together.

  • type=alternative: Different representations of same content
  • type=mixed: Independent parts (text + attachments)
  • type=related: Parts that reference each other (HTML + images)

<#part>

Defines a message part.

  • type=<mime-type>: Content type (e.g., text/html, application/pdf)
  • filename=<path>: File to attach
  • name=<name>: Display name for attachment
  • disposition=inline: Display inline instead of as attachment
  • id=<cid>: Content ID for referencing in HTML

Composing from CLI

Interactive compose

Opens your $EDITOR:

himalaya message write

Reply (opens editor with quoted message)

himalaya message reply 42
himalaya message reply 42 --all  # reply-all

Forward

himalaya message forward 42

Send from stdin

cat message.txt | himalaya template send

Prefill headers from CLI

himalaya message write \
  -H "To:[email protected]" \
  -H "Subject:Quick Message" \
  "Message body here"

Tips

  • The editor opens with a template; fill in headers and body.
  • Save and exit the editor to send; exit without saving to cancel.
  • MML parts are compiled to proper MIME when sending.
  • Use himalaya message export --full to inspect the raw MIME structure of received emails.