Returns a JSON list of directories for the mailbox.
Returns a JSON list of messages in the directory, sorted with the most recent messages appearing first.
The headers X-Total-Count
and X-Unread-Count
contain the number of total
messages in the directory and the number of unread messages in the directory,
respectively.
Adds a new message to the directory. If given message/rfc822
data, the raw
message is parsed and stored. If given application/json
data, it should be a
mail object with the properties described by the
node-mailparser project.
Deletes the directory and all messages inside it.
Fetches the message from storage. The result will be application/json
data
for an object as described by the
node-mailparser project.
Deletes the message from storage and removes its indices from the directory it was contained in.
Gets all the flags associated with the message. These are the same flags
described by IMAP (Seen
, Answered
, Flagged
, Draft
, Deleted
) and are
case-sensitive. The response is a JSON list of set flags.
Returns 200
status if the flag is set for the message, or 404
if the flag
is not set (or the flag was not recognized).
Sets the given flag for the message.
Unsets the given flag for the message.
Gets all the meta information associated with the message. Currently, this will
return a JSON dictionary with two keys, From
and Subject
.
125 SISMEMBER O(1)
50 HGET O(1)
1 ZCARD O(1)
1 SMEMBERS O(N) N -> Number of folders
1 ZREVRANGE O(log(N)+M) N -> Number of messages in the folder
M -> Page size
1 *DEL O(N) N -> Number of read messages in the folder
1 *ZINTERSTORE O(2*N)+O(M*log(M)) N -> Number of messages in the folder
M -> Number of read messages in the folder
5 SISMEMBER O(1)
1 SADD O(1)
1 ZCARD O(1)
1 SwiftRead O(1)
1 *DEL O(N) N -> Number of read messages in the folder
1 *ZINTERSTORE O(2*N)+O(M*log(M)) N -> Number of messages in the folder
M -> Number of read messages in the folder