Skip to content

feat: batch mail operations (multiple UIDs per command)#10

Merged
gumruyanzh merged 1 commit into
mainfrom
feat/batch-mail-operations
Jul 5, 2026
Merged

feat: batch mail operations (multiple UIDs per command)#10
gumruyanzh merged 1 commit into
mainfrom
feat/batch-mail-operations

Conversation

@gumruyanzh

Copy link
Copy Markdown
Contributor

Summary

mail delete/move/star/unstar/mark-read/mark-unread now accept multiple UIDs in one invocation, acting within a single IMAP session instead of one process/connection per message. mail move takes the destination via --to so the UID list can be variadic.

  • imap: DeleteMessages / MoveMessages / SetFlagsMulti (+ StarMessages/UnstarMessages/MarkReadMulti/MarkUnreadMulti) operate on a UID set; single-message methods delegate to them.
  • cmd: variadic UID args; move gains a required --to flag.
  • README: documents the batch syntax.

Why

Enables bulk mailbox organization (emptying junk folders, filing by category) that was impractical when each message needed its own process.

Verification

  • gofmt/go vet/go build clean; go test ./... green.
  • Live: yoy mail star 17296 17297 flagged both; unstar 17296 17297 reverted both (verified via --json).

🤖 Generated with Claude Code

mail delete/move/star/unstar/mark-read/mark-unread now accept multiple
UIDs in one invocation, acting in a single IMAP session instead of one
connection per message. mail move takes the destination via --to so the
UID list can be variadic.

- imap: add DeleteMessages/MoveMessages/SetFlagsMulti (+ Star/Unstar/
  MarkRead/MarkUnread multi wrappers) operating on a UID set; the
  single-message methods now delegate to them.
- cmd: variadic UID args; move gains a required --to flag.
- README: document the batch syntax.

Enables bulk inbox organization (clearing junk folders, filing by
category) that was impractical one message per process.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gumruyanzh gumruyanzh merged commit 0747fee into main Jul 5, 2026
@gumruyanzh gumruyanzh deleted the feat/batch-mail-operations branch July 5, 2026 06:23
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