Documentation ¶
Index ¶
- type Client
- func (c *Client) Auth(username, password string) error
- func (c *Client) Caps() (caps []string, err error)
- func (c *Client) Cmd(format string, args ...interface{}) (string, error)
- func (c *Client) Dele(msg int) (err error)
- func (c *Client) List(msg int) (size int, err error)
- func (c *Client) ListAll() (msgs []int, sizes []int, err error)
- func (c *Client) Noop() (err error)
- func (c *Client) Quit() error
- func (c *Client) ReadLines() (lines []string, err error)
- func (c *Client) Retr(msg int) (text string, err error)
- func (c *Client) Rset() (err error)
- func (c *Client) Stat() (count, size int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
The POP3 client.
func Dial ¶
Dial creates an unsecured connection to the POP3 server at the given address and returns the corresponding Client.
func DialTLS ¶
DialTLS creates a TLS-secured connection to the POP3 server at the given address and returns the corresponding Client.
func (*Client) Auth ¶
Auth sends the given username and password to the server, calling the User and Pass methods as appropriate.
func (*Client) Cmd ¶
Convenience function to synchronously run an arbitrary command and wait for output. The terminating CRLF must be included in the format string.
Output sent after the first line must be retrieved via readLines.
func (*Client) List ¶
List returns the size of the given message, if it exists. If the message does not exist, or another error is encountered, the returned size will be 0.
func (*Client) Noop ¶
Noop does nothing, but will prolong the end of the connection if the server has a timeout set.
func (*Client) Retr ¶
Retr downloads and returns the given message. The lines are separated by LF, whatever the server sent.
func (*Client) Stat ¶
Stat retrieves a drop listing for the current maildrop, consisting of the number of messages and the total size (in octets) of the maildrop. Information provided besides the number of messages and the size of the maildrop is ignored. In the event of an error, all returned numeric values will be 0.