Common Lisp Package: CL-POP

README:

FUNCTION

Public

DELETE-POP-MESSAGE (CONN MESSAGE-NUM)

Mark the given message number for deletion

MESSAGE-COUNT (CONN)

Number of message currently in the mailbox

MESSAGE-HEADERS (CONN MESSAGE-NUM)

Returns an assoc list of the email headers, if duplicate or multiline headers are present, they will be appended togther to form one associated pair

RETRIEVE-POP-MESSAGE (CONN MESSAGE-NUM &KEY (MAX-SIZE NIL))

Returns a plist of the message with :header containing the parsed header fields and body containing a list where each element in the list is a string representing 1 line of the message. If a max-size is providing in bytes the message size is checked first if it is greater then the max nil is returned

SAVE-MESSAGE (CONN MESSAGE-NUM PATHNAME)

Saves message's entire contents including headers into a file with the given pathname

SEND-POP-DELE (CONN MESSAGE-NUM)

conn - pop connection class message-num - pop message number to mark for deletion Mark the given message number for deletion. Deletion occurs when the Quit Command is given

SEND-POP-LIST (CONN &OPTIONAL (MESSAGE-NUM NIL))

Conn -- pop-connection instance, Message-num -- integer, number of desired message optional Returns list of lists where the first atom is the message number and the second is the message size. If a message number is provided only the list for that particular message will be return.

SEND-POP-NOOP (CONN)

conn - pop-conneciton instance Sends a no operation command

SEND-POP-QUIT (CONN)

Ends the connection on the server

SEND-POP-RETR (CONN MESSAGE-NUM)

Retrieves the entire message and returns a list where each atom in the list is one line in the file. It is recommended that one uses the retrieve-pop-message function instead which offers a check for large mail messages.

SEND-POP-RSET (CONN)

conn - pop connection class Reset all messages that have been marked for deletion

SEND-POP-STAT (CONN)

conn - pop-connection instance Executes the pop stat command, returns a list if successful, with the number of messages in the mailbox and their combined size

SEND-POP-TOP (CONN MESSAGE-NUM LINE-COUNT)

Retrieves the messages header for the given message num and the first # of lines of the body of the message as determined by the line-count input

SEND-POP-UIDL (CONN &OPTIONAL (MESSAGE-NUM NIL))

conn - pop-connection instance message-num (optional) if given only return list for this message Returns a list of lists, where the first element is the message num and the second is the unique id number for that message. If a message num is given only that individual messages information is returned

Undocumented

CLOSE-POP-CONNECTION (CONN)

OPEN-POP-CONNECTION (&KEY HOST (PORT 110) USERNAME PASSWORD)

Private

BREAK-POP-RESPONSE (STR &KEY (INTEGERS NIL))

Separate answers into their individual components. would be faster to use regular expressions, but this keeps to pop package lighter. The integers key can be set to t if the answer is known to be a list of integers

CLEAN-POP-MESSAGE (STR START &KEY (MASK-DOT? NIL))

Removes status key and end of line characters from string

Undocumented

AUTHORIZE-POP-CONNECTION (CONN)

PARSE-RAW-MESSAGE-HEADERS (HEADERS)

SEND-POP-COMMAND (CONN COMMAND)

MACRO

Public

Undocumented

WITH-POP-CONNECTION ((VAR &REST ARGS) &BODY BODY)

Private

GENERIC-FUNCTION

Private

Undocumented

READ-MULTI-LINE-POP-RESPONSE (CONN &KEY (MASK-DOT? NIL))

READ-SINGLE-POP-RESPONSE (CONN)

SLOT-ACCESSOR

Private

STATE (OBJECT)

Current state of the connection options are :disconnected, :connected

SETFSTATE (NEW-VALUE OBJECT)

Current state of the connection options are :disconnected, :connected

Undocumented

HOST (OBJECT)

PASSWORD (OBJECT)

PORT (OBJECT)

SOCKET (OBJECT)

SETFSOCKET (NEW-VALUE OBJECT)

SOCKET-STREAM (OBJECT)

SETFSOCKET-STREAM (NEW-VALUE OBJECT)

USERNAME (OBJECT)

VARIABLE

Private

Undocumented

*POP-DEBUG?

*TERMINATION-STRING*

CLASS

Private

Undocumented

POP-CONNECTION