Liking cljdoc? Tell your friends :D

mailseq.source

MailSource protocol: the unified, read-only interface shared by every backend (IMAP, Maildir).

Consumers should use the functions in the top-level mailseq namespace rather than calling protocol methods directly. The protocol exists to let backends plug into that public API.

MailSource protocol: the unified, read-only interface shared by every
backend (IMAP, Maildir).

Consumers should use the functions in the top-level `mailseq` namespace
rather than calling protocol methods directly. The protocol exists to
let backends plug into that public API.
raw docstring

MailSourcecljprotocol

Read-only view over a mail source.

A source owns a fixed, explicit map of logical folder names to backend-specific locations. Logical names are the only identifiers the public API accepts — there is no folder discovery.

Read-only view over a mail source.

A source owns a fixed, explicit map of *logical folder names* to
backend-specific locations. Logical names are the only identifiers the
public API accepts — there is no folder discovery.

-by-idclj

(-by-id this folder-name id opts)

Return a single message map (or nil) from folder-name identified by the backend's stable id (long, string, or backend-specific).

Return a single message map (or nil) from `folder-name` identified
by the backend's stable id (long, string, or backend-specific).

-messagesclj

(-messages this folder-name opts)

Return a vector of message maps from the given logical folder. opts is restricted to mailseq.filter/allowed-option-keys.

Return a vector of message maps from the given logical folder.
`opts` is restricted to `mailseq.filter/allowed-option-keys`.

-by-id-rangeclj

(-by-id-range this folder-name start-id end-id opts)

Return a vector of message maps whose ids fall in [start-id, end-id]. For IMAP, delegates to UID-range fetch. For Maildir, filters list-ids by lexicographic comparison. end-id may be nil to mean "to the end".

Return a vector of message maps whose ids fall in [start-id, end-id].
For IMAP, delegates to UID-range fetch. For Maildir, filters `list-ids`
by lexicographic comparison. `end-id` may be nil to mean "to the end".

-watch-asyncclj

(-watch-async this folder-name on-message opts)

Like -watch but starts in a new daemon thread. Returns a java.io.Closeable whose .close stops the watch.

Like `-watch` but starts in a new daemon thread. Returns a
`java.io.Closeable` whose `.close` stops the watch.

-closeclj

(-close this)

Release any resources held by this source. Idempotent.

Release any resources held by this source. Idempotent.

-uid-validityclj

(-uid-validity this folder-name)

Return the UIDVALIDITY of folder-name as a long, or nil when the backend has no such notion (Maildir).

Return the UIDVALIDITY of `folder-name` as a long, or nil when the
backend has no such notion (Maildir).

-by-idsclj

(-by-ids this folder-name ids opts)

Return a vector of message maps for the given set of ids. More efficient than repeated -by-id calls: a single filesystem or server round-trip.

Return a vector of message maps for the given set of ids.
More efficient than repeated `-by-id` calls: a single filesystem
or server round-trip.

-watchclj

(-watch this folder-name on-message opts)

Start watching folder-name for new messages, calling on-message with each parsed message map. Blocks the current thread. For IMAP, delegates to IDLE; for Maildir, delegates to WatchService.

Start watching `folder-name` for new messages, calling `on-message`
with each parsed message map. Blocks the current thread.
For IMAP, delegates to IDLE; for Maildir, delegates to WatchService.

-list-foldersclj

(-list-folders this)

Return a vector of the logical folder names known to this source. Order follows the configuration's insertion order when available.

Return a vector of the logical folder names known to this source.
Order follows the configuration's insertion order when available.

-list-idsclj

(-list-ids this folder-name)

Return a vector of stable id strings for every message in folder-name, without reading or parsing message content. For IMAP, ids are UID strings; for Maildir, filename prefixes.

Return a vector of stable id strings for every message in
`folder-name`, without reading or parsing message content.
For IMAP, ids are UID strings; for Maildir, filename prefixes.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close