Liking cljdoc? Tell your friends :D

clojure-mail.core


*store*clj

source

all-messagesclj

(all-messages folder-name)
(all-messages store folder-name & {:keys [since-uid]})

Given a store and folder returns all messages reversed so the newest messages come first. If since-uid is provided, return all messages with newer or equal uid

Given a store and folder returns all messages
 reversed so the newest messages come first. 
If since-uid is provided, return all messages with newer or equal uid
sourceraw docstring

as-propertiesclj

(as-properties m)
source

close-storeclj

(close-store s)

Close an open IMAP store connection

Close an open IMAP store connection
sourceraw docstring

connected?clj

(connected? s)

Returns true if a connection is established

Returns true if a connection is established
sourceraw docstring

dumpclj

(dump msgs)

Handy function that dumps out a batch of emails to disk

Handy function that dumps out a batch of emails to disk
sourceraw docstring

file->messageclj

(file->message path-to-message)

read a downloaded mail message in the same format as you would find on the mail server. This can be used to read saved messages from text files and for parsing fixtures in tests etc

read a downloaded mail message in the same format
as you would find on the mail server. This can
be used to read saved messages from text files
and for parsing fixtures in tests etc
sourceraw docstring

folder-permissionsclj

source

foldersclj

(folders store)
(folders store f)

Returns a seq of all IMAP folders inlcuding sub folders

Returns a seq of all IMAP folders inlcuding sub folders
sourceraw docstring

get-default-folderclj

(get-default-folder s)
source

get-folderclj

(get-folder s name)

Return the Folder object corresponding to the given name.

Return the Folder object corresponding to the given name.
sourceraw docstring

get-folder-uid-validityclj

(get-folder-uid-validity folder)

Return the Folder UIDValidity

Return the Folder UIDValidity
sourceraw docstring

get-sessionclj

(get-session protocol)
source

inboxclj

(inbox)
(inbox store)

Get n messages from your inbox

Get n messages from your inbox
sourceraw docstring

mark-all-readclj

(mark-all-read folder-name)
(mark-all-read store folder-name)

Mark all messages in folder as read

Mark all messages in folder as read
sourceraw docstring

message-countclj

(message-count folder-name)
(message-count store folder-name)

Returns the number of messages in a folder

Returns the number of messages in a folder
sourceraw docstring

open-folderclj

(open-folder folder-name perm-level)
(open-folder store folder-name perm-level)

Open and return a folder. A folder-name is string (usually a label name)

Open and return a folder.
A folder-name is string (usually a label name)
sourceraw docstring

save-message-to-fileclj

(save-message-to-file message)
source

search-inboxclj

(search-inbox store term)

Search your inbox for a specific term Returns a vector of IMAPMessage objects

Search your inbox for a specific term
Returns a vector of IMAPMessage objects
sourceraw docstring

server->host-portclj

(server->host-port protocol server)

Given a protocol ("imap" or "imaps") and a server that can be

  • a String with the hostname
  • a vector of the form [hostname, port]

It returns a vector [host, port] using the protocol well-known ports if required.

Given a protocol (`"imap"` or `"imaps"`) and a `server` that can be

* a `String` with the hostname
* a `vector` of the form `[hostname, port]`

It returns a vector `[host, port]` using the `protocol` well-known
ports if required.
sourceraw docstring

storeclj

(store server email pass)
(store protocol server email pass)
(store protocol session server email pass)

A store models a message store and its access protocol, for storing and retrieving messages. The server parameter can be a String with the hostname or a vector like [^String hostname ^int port]. The first form will make the connection use the default ports for the defined protocol.

A store models a message store and its access protocol,
for storing and retrieving messages.
The `server` parameter can be a String with the hostname or
a vector like [^String hostname ^int port]. The first form will
make the connection use the default ports for the defined
`protocol`.
sourceraw docstring

sub-folder?clj

Check if a folder is a sub folder

Check if a folder is a sub folder
sourceraw docstring

unread-messagesclj

(unread-messages folder-name)
(unread-messages store folder-name)

Find unread messages

Find unread messages
sourceraw docstring

user-flagsclj

(user-flags message)
source

with-storecljmacro

(with-store s & body)

Takes a store which has been connected, and binds to to store within the scope of the form.

Usage:

user> (with-store (gmail-store "username@gmail.com" "password") (read-messages :inbox 5)) ;=>

Takes a store which has been connected, and binds to to *store* within the
scope of the form.

**Usage:**

 user> (with-store (gmail-store "username@gmail.com" "password")
         (read-messages :inbox 5))
 ;=> 
sourceraw docstring

xoauth2-storeclj

(xoauth2-store server email oauth-token)
(xoauth2-store protocol server email oauth-token)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close