using MIME instead of MML

This commit is contained in:
Yanxin Lu
2026-03-18 14:36:29 -07:00
parent c4125d1145
commit 765825a8d1
3 changed files with 221 additions and 69 deletions

View File

@@ -8,6 +8,10 @@ metadata: {"clawdbot":{"emoji":"📅","requires":{"bins":["himalaya","vdirsyncer
Send, accept, and decline calendar invitations via email using himalaya. Events are saved to local calendar and synced to CalDAV (Migadu) via vdirsyncer.
## Testing
See `TESTING.md` for dry-run and live test steps, verification checklists, and troubleshooting.
## Prerequisites
- `himalaya` configured and working (see the `himalaya` skill)
@@ -71,7 +75,7 @@ $SKILL_DIR/scripts/calendar-invite.sh send \
| `--organizer` | No | Organizer display name (defaults to `--from`) |
| `--uid` | No | Custom event UID (auto-generated if omitted) |
| `--account` | No | Himalaya account name (if not default) |
| `--dry-run` | No | Print ICS + MML without sending |
| `--dry-run` | No | Print ICS + MIME without sending |
### Send Examples
@@ -153,8 +157,8 @@ $SKILL_DIR/scripts/calendar-invite.sh reply \
**Sending invites:**
1. Generates an RFC 5545 ICS file with `METHOD:REQUEST` (via `icalendar` library)
2. Builds an MML email with a `text/calendar` attachment
3. Sends via `himalaya template send`
2. Builds a MIME email with a `text/calendar` attachment (via Python `email.mime`)
3. Sends via `himalaya message send` (piped through stdin)
4. Saves the event to `~/.openclaw/workspace/calendars/home/`
5. Runs `vdirsyncer sync` to push to Migadu CalDAV
@@ -162,7 +166,7 @@ $SKILL_DIR/scripts/calendar-invite.sh reply \
1. Extracts the `.ics` attachment from the email (via `himalaya attachment download`)
2. Parses the original event with the `icalendar` library
3. Generates a reply ICS with `METHOD:REPLY` and the correct `PARTSTAT`
4. Sends the reply to the organizer via `himalaya template send`
4. Sends the reply to the organizer via `himalaya message send` (stdin)
5. On accept/tentative: saves event to local calendar. On decline: removes it
6. Runs `vdirsyncer sync` to push changes to Migadu CalDAV
@@ -206,7 +210,7 @@ Common IANA timezones:
## Troubleshooting
**Invite shows as attachment instead of calendar event?**
- Ensure `type=text/calendar method=REQUEST` is set on the MML part
- Ensure the MIME part has `Content-Type: text/calendar; method=REQUEST`
- Some clients require the `METHOD:REQUEST` line in the ICS body
**Times are wrong?**