Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for POP3.
func (*Client) Authorization ¶
Authorization logs into POP3 server with login and password.
func (*Client) Dele ¶
Dele will delete the given message from the maildrop. Changes will only take affect after the Quit command is issued.
func (*Client) ListAll ¶
func (c *Client) ListAll() (list []MessageList, err error)
ListAll returns a MessageList object which contains all messages in the maildrop.
type Connection ¶
type Connection struct { Reader *textproto.Reader Writer *textproto.Writer // contains filtered or unexported fields }
Client holds the net conn and read/write buffer objects.
func NewConnection ¶
func NewConnection(conn io.ReadWriteCloser) *Connection
NewConnection initializes a connection.
func (*Connection) Cmd ¶
func (c *Connection) Cmd(format string, args ...interface{}) (string, error)
Cmd sends the given command on the connection.
func (*Connection) ReadLine ¶
func (c *Connection) ReadLine() (string, error)
ReadLine reads a single line from the buffer.
func (*Connection) ReadLines ¶
func (c *Connection) ReadLines() (lines []string, err error)
ReadLines reads from the buffer until it hits the message end dot (".").
type MessageList ¶
type MessageList struct { // Non unique id reported by the server ID int // Size of the message Size int }
MessageList represents the metadata returned by the server for a message stored in the maildrop.
Click to show internal directories.
Click to hide internal directories.