server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeenFlag     = "\\Seen"
	AnsweredFlag = "\\Answered"
	FlaggedFlag  = "\\Flagged"
	DeletedFlag  = "\\Deleted"
	DraftFlag    = "\\Draft"
	RecentFlag   = "\\Recent"
)

System message flags, defined in RFC 3501 section 2.3.2.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Server        string `yaml:"server"`
	Port          int    `yaml:"port"`
	Username      string `yaml:"username"`
	Password      string `yaml:"password"`
	IMAPS         bool   `yaml:"imaps"`
	Starttls      *bool  `yaml:"starttls"`
	TLSVerify     *bool  `yaml:"tlsverify"`
	TLSCACertFile string `yaml:"cacertfile"`
	// contains filtered or unexported fields
}

func (*Connection) Connect

func (conn *Connection) Connect() error

Manually connect to the IMAP server. Usually the session to the IMAP server is re-established automatically if we're disconnected or logged out.

func (*Connection) CreateMailbox

func (conn *Connection) CreateMailbox(name string) error

func (*Connection) DeleteMailbox

func (conn *Connection) DeleteMailbox(name string) error

func (*Connection) DeleteMsgs

func (conn *Connection) DeleteMsgs(mailbox string, uids []uint32, expunge bool) error

func (*Connection) Disconnect

func (conn *Connection) Disconnect() error

func (*Connection) Fetch

func (conn *Connection) Fetch(mailbox string, uids []uint32) ([]*Message, error)

func (*Connection) GetFlags

func (conn *Connection) GetFlags(mailbox string, uid uint32) ([]string, error)

func (*Connection) List

func (conn *Connection) List() (map[string]imapUtil.MailboxInfo, error)

List mailboxes

func (*Connection) Move

func (conn *Connection) Move(uids []uint32, from string, to string) error

func (*Connection) Search

func (conn *Connection) Search(mailbox string, withFlags []string, withoutFlags []string) ([]uint32, error)

func (*Connection) SearchAndFetch

func (conn *Connection) SearchAndFetch(mailbox string, withFlags []string, withoutFlags []string) ([]*Message, error)

func (*Connection) Select

func (conn *Connection) Select(mailbox string, readOnly bool, autoCreate bool) (*imapUtil.MailboxStatus, error)

func (*Connection) SetFlags

func (conn *Connection) SetFlags(mailbox string, uids []uint32, flagOp string, flags []interface{}, expunge bool) error

func (*Connection) Upload

func (conn *Connection) Upload(file string, mailbox string, flags []string) error

type Message

type Message struct {
	RawMessage imapUtil.Message
	Headers    MessageHeaders
}

func NewMessage

func NewMessage(rawMail *imapUtil.Message, headers MessageHeaders) *Message

type MessageHeaders

type MessageHeaders map[string]interface{}

type RawMessage

type RawMessage imapUtil.Message

Jump to

Keyboard shortcuts

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