imapwrapper

package
v0.0.0-...-1deaa9e Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImapWrapper

type ImapWrapper struct {
	Host     string
	Port     string
	Username string
	Password string
	// contains filtered or unexported fields
}

func (*ImapWrapper) Connect

func (iw *ImapWrapper) Connect() error

func (*ImapWrapper) GetMailBoxes

func (iw *ImapWrapper) GetMailBoxes() ([]IwMailbox, error)

func (*ImapWrapper) GetMessage

func (iw *ImapWrapper) GetMessage(mailboxName string, uid uint32) (*IwMessage, error)

func (*ImapWrapper) GetPreviewMessages

func (iw *ImapWrapper) GetPreviewMessages(mailboxName string, page, limit int) (*PreviewMessageResponse, error)

- Retrieve IMAP preview messages in descending order

func (*ImapWrapper) Logout

func (iw *ImapWrapper) Logout()

func (*ImapWrapper) UpdateMessage

func (iw *ImapWrapper) UpdateMessage(mailbox string, uid uint32, flagsToAdd, flagsToRemove []string) error

type IwMailbox

type IwMailbox struct {
	Name         string
	Delimiter    string
	MessageCount uint32 // All Message count
	UnseenCount  uint32
}

type IwMessage

type IwMessage struct {
	IwPreviewMessage
	MimeContent mimeParser.MimePart
	Header      map[string][]string
}

type IwPreviewMessage

type IwPreviewMessage struct {
	Uid          uint32
	Flags        []string
	Envelope     *imap.Envelope
	MessageSize  uint32
	InternalDate time.Time
	PreviewText  string
}

type PreviewMessageResponse

type PreviewMessageResponse struct {
	Data         *[]IwPreviewMessage
	TotalMessage uint32
}

Jump to

Keyboard shortcuts

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