imap

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 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 Client

type Client struct {
	Con *client.Client
	// 当前邮箱中的邮件总数量
	Num   uint32
	Mails chan *Mail
}

func NewClient

func NewClient(num uint32) (*Client, error)

func (*Client) Logout

func (c *Client) Logout()

func (*Client) Reconnect

func (c *Client) Reconnect() error

func (*Client) SetAnsweredFlag

func (c *Client) SetAnsweredFlag(uid uint32) error

邮件设置AnsweredFlag

func (*Client) UnreadMails

func (c *Client) UnreadMails() (int, error)

type Mail

type Mail struct {
	// 邮件唯一编号
	Uid uint32
	// 邮件正文
	Body string
	// 邮件主题
	Subject string
	// 收件人、抄送人
	To, Cc []string
	// 附件
	Attachments map[string]io.Reader
}

func NewMailFromMessage

func NewMailFromMessage(msg *imap.Message, section *imap.BodySectionName) (*Mail, error)

Jump to

Keyboard shortcuts

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