Documentation ¶
Index ¶
- Variables
- func GetCurrentNum() uint32
- func Keepalive()
- func Logout()
- func NewClient(address, user, password string, num uint32) error
- func Reconnect() error
- func SetAnsweredFlag(uid uint32) error
- func UnReadMailsUID(box string) ([]uint32, error)
- func UnReadMailsUIDByDate(box string, since, before time.Time) ([]uint32, error)
- func UnreadMails(box string) (int, error)
- type BaseMail
- type Client
- func (c *Client) GetBaseMails(box string, from, till uint32) ([]BaseMail, error)
- func (c *Client) GetCurrentNum() uint32
- func (c *Client) GetEmailBySubject(box, keyword string) (*Mail, error)
- func (c *Client) GetEmailByUID(boxName string, uid uint32) (*Mail, error)
- func (c *Client) Keepalive()
- func (c *Client) Logout()
- func (c *Client) Reconnect() error
- func (c *Client) SetAnsweredFlag(uid uint32) error
- func (c *Client) UnReadMailsUID(box string) ([]uint32, error)
- func (c *Client) UnReadMailsUIDByDate(box string, since, before time.Time) ([]uint32, error)
- func (c *Client) UnreadMails(box string) (int, error)
- type Mail
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSearchNil = errors.New("search result is nil")
Functions ¶
func SetAnsweredFlag ¶ added in v1.0.24
通过UID设置邮件Answered Flag
func UnReadMailsUIDByDate ¶ added in v1.0.24
获取时间段内所有未读邮件的UID
Types ¶
type BaseMail ¶ added in v1.0.15
type Client ¶
type Client struct { // 当前邮箱中的邮件总数量 Num uint32 Mails chan *Mail // contains filtered or unexported fields }
func (*Client) GetBaseMails ¶ added in v1.0.15
func (*Client) GetCurrentNum ¶ added in v1.0.25
func (*Client) GetEmailBySubject ¶ added in v1.0.18
func (*Client) GetEmailByUID ¶ added in v1.0.7
func (*Client) SetAnsweredFlag ¶
func (*Client) UnReadMailsUID ¶ added in v1.0.6
func (*Client) UnReadMailsUIDByDate ¶ added in v1.0.24
type Mail ¶
type Mail struct { // 邮件基础信息 BaseMail // 邮件正文 Body string // 收件人、抄送人 To, Cc []string // 附件 Attachments map[string]io.Reader }
func GetEmailBySubject ¶ added in v1.0.24
通过标题搜索并获取邮件 当搜索结果大于1封邮件时, 将会抛出异常
func GetEmailByUID ¶ added in v1.0.24
通过UID获取邮件
func NewMailFromMessage ¶
Click to show internal directories.
Click to hide internal directories.