mail

package
v0.0.0-...-a6a29b8 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyMailbox = errors.New("mailbox is empty")
View Source
var ErrNotFound = errors.New("not found messgaes")

Functions

This section is empty.

Types

type ListMailResponse

type ListMailResponse struct {
	Data  []MailDto
	Pages int
}

type MailAttachmentDto

type MailAttachmentDto struct {
	Mime  string
	Name  string
	Index int
	// contains filtered or unexported fields
}

func (*MailAttachmentDto) GetReader

func (ma *MailAttachmentDto) GetReader() io.Reader

func (*MailAttachmentDto) SetReader

func (ma *MailAttachmentDto) SetReader(r io.Reader)

type MailDto

type MailDto struct {
	MessageId   string
	Uid         uint32
	SeqNum      uint32
	From        string
	Subject     string
	Date        time.Time
	Attachments []MailAttachmentDto
}

type MailReader

type MailReader struct {
	Cl            *client.Client
	CurrentFolder *imap.MailboxStatus
}

func Dial

func Dial() *MailReader

func Get

func Get() *MailReader

func (*MailReader) DownloadAttachment

func (mr *MailReader) DownloadAttachment(uid int, mime string, name string) (io.Reader, error)

func (*MailReader) GetBySid

func (mr *MailReader) GetBySid(sid int) (*MailDto, error)

view message by sid

func (*MailReader) Last

func (mr *MailReader) Last(count int) (*ListMailResponse, error)

func (*MailReader) List

func (mr *MailReader) List(page int) (*ListMailResponse, error)

List of emails

func (*MailReader) MailBoxes

func (mr *MailReader) MailBoxes() ([]string, error)

List of mailboxes

func (*MailReader) Move

func (mr *MailReader) Move(uid uint32, mailbox string) error

func (*MailReader) SetFolder

func (mr *MailReader) SetFolder(folder string) (*imap.MailboxStatus, error)

Setted current Folder

Jump to

Keyboard shortcuts

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