imap

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package imap implements all IMAP interactions of KoboMail

Package imap implements all IMAP interactions of KoboMail

Package imap implements all IMAP interactions of KoboMail

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	SearchCriteria *imap.SearchCriteria
	// contains filtered or unexported fields
}

Connection is a simple implementation of an IMAP connection

func ConnectToServer

func ConnectToServer(host string, port int) (*Connection, error)

ConnectToServer instantiates a new connection to an IMAP server

func (*Connection) CollectMessages

func (ic *Connection) CollectMessages() ([]*message, error)

CollectMessages collects the messages based on the criteria set on the IMAPConnection.

func (*Connection) DeleteMessage

func (ic *Connection) DeleteMessage(msg *message) error

DeleteMessage deletes the specified message on the server.

func (*Connection) Login

func (ic *Connection) Login(username string, password string) error

Login identifies the client to the server and carries the plaintext password authenticating this user.

func (*Connection) Logout

func (ic *Connection) Logout() error

Logout gracefully closes the connection.

func (*Connection) SelectMailbox

func (ic *Connection) SelectMailbox(mailbox string) (*imap.MailboxStatus, error)

SelectMailbox selects a mailbox so that messages in the mailbox can be accessed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL