Skip to content

feat(cli): add mail read command (fc-h2at)#2

Open
seanb4t wants to merge 1 commit intomainfrom
polecat/topaz/fc-h2at@ml8l2wta
Open

feat(cli): add mail read command (fc-h2at)#2
seanb4t wants to merge 1 commit intomainfrom
polecat/topaz/fc-h2at@ml8l2wta

Conversation

@seanb4t
Copy link
Owner

@seanb4t seanb4t commented Feb 4, 2026

Summary

  • Add mail read EMAIL_ID CLI subcommand to display full email content
  • Enhance MailService.Get() to fetch from/to/cc and body text via fetchTextBodyValues
  • Enrich convertEmails() to populate address and body fields from JMAP response

Test plan

  • go build ./... passes
  • go test ./... passes (all packages)
  • TestMailHelp_ShowsSubcommands updated to verify "read" appears
  • TestMailRead_RequiresEmailID validates argument requirement
  • Manual test: fastmail-cli mail read <id> shows headers + body
  • Manual test: fastmail-cli mail read <id> --json shows full struct

🤖 Generated with Claude Code

Enhance MailService.Get() to fetch full email properties including
from, to, cc, and body text via fetchTextBodyValues. Add mail read
CLI subcommand that displays email headers and body in text or JSON
format. Update convertEmails to populate address and body fields.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant