class POPSession

Defined in:

devmail/pop_session.cr

Constructors

Instance Method Summary

Instance methods inherited from class Session

greet greet, process_command(command : String, full_data : String) process_command, respond(text : String) respond

Constructor methods inherited from class Session

new(client : TCPSocket) new

Constructor Detail

def self.new(client : TCPSocket, store : Store) #

[View source]

Instance Method Detail

def capa #

Show the client what we can do


[View source]
def dele(message : Symbol | Int) #

Deletes message


[View source]
def greet #

Send a greeting to client


[View source]
def list(message_id) #

Show list of messages

When a message ID is specified only list the size of that message


[View source]
def message_number(full_data) #

Returns message number parsed from full_data:

  • No message number => :all
  • Message does not exists => :invalid
  • valid message number => some fixnum

[View source]
def message_uid(message : String) #

[View source]
def pass(full_data) #

Authenticate client


[View source]
def process_command(command : String, full_data : String) #

Process command


[View source]
def quit #

Quits


[View source]
def respond(status : Bool, message : String) #

Respond to client with a POP3 prefix (+OK or -ERR)


[View source]
def retr(message_id) #

Retreives message


[View source]
def stat #

Shows total number of messages and size


[View source]
def top(full_data) #

Display headers of message


[View source]
def uidl(message_id) #

Shows list of message uid

When a message id is specified only list the uid of that message


[View source]
def user(full_data) #

Accept username


[View source]