Documentation
¶
Index ¶
- func FormatAddress(addr *imap.Address) string
- func FormatAddressList(addrs []imap.Address) []string
- func FormatFlags(flags []imap.Flag) []string
- func ParseFlags(flags []string) []imap.Flag
- type Attachment
- type Config
- type DefaultObject
- type IMAPClient
- type Mail
- type Mailbox
- func (obj *Mailbox) FormatAddr(name, address string) string
- func (obj *Mailbox) OpenIMAP(vm *goja.Runtime) (*IMAPClient, error)
- func (obj *Mailbox) ParseAddr(addr string) (name, address string, err error)
- func (obj *Mailbox) ParseAddrList(addrs []string) ([]map[string]string, error)
- func (obj *Mailbox) Recv(vm *goja.Runtime, opt *RecvOption) (*RecvResult, error)
- func (obj *Mailbox) Send(vm *goja.Runtime, to []string, subject, content string, option *SendOption) error
- type MailboxConfig
- type MailboxInfo
- type RecvOption
- type RecvResult
- type SendOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAddressList ¶ added in v0.0.3
地址列表格式化
func FormatFlags ¶ added in v0.0.3
func ParseFlags ¶ added in v0.0.3
Types ¶
type DefaultObject ¶
type DefaultObject struct {
*Mailbox
}
func (*DefaultObject) Get ¶ added in v0.0.3
func (obj *DefaultObject) Get(name string) (*Mailbox, error)
func (*DefaultObject) New ¶
func (obj *DefaultObject) New(conf *MailboxConfig) *Mailbox
type IMAPClient ¶ added in v0.0.3
type IMAPClient struct {
// contains filtered or unexported fields
}
func (*IMAPClient) Close ¶ added in v0.0.3
func (obj *IMAPClient) Close(vm *goja.Runtime)
func (*IMAPClient) ListMailbox ¶ added in v0.0.3
func (obj *IMAPClient) ListMailbox(vm *goja.Runtime) ([]MailboxInfo, error)
func (*IMAPClient) Recv ¶ added in v0.0.3
func (obj *IMAPClient) Recv(vm *goja.Runtime, opt *RecvOption) (*RecvResult, error)
type Mailbox ¶ added in v0.0.3
type Mailbox struct {
// contains filtered or unexported fields
}
func (*Mailbox) FormatAddr ¶ added in v0.0.3
func (*Mailbox) OpenIMAP ¶ added in v0.0.3
func (obj *Mailbox) OpenIMAP(vm *goja.Runtime) (*IMAPClient, error)
func (*Mailbox) ParseAddrList ¶ added in v0.0.3
func (*Mailbox) Recv ¶ added in v0.0.3
func (obj *Mailbox) Recv(vm *goja.Runtime, opt *RecvOption) (*RecvResult, error)
type MailboxConfig ¶ added in v0.0.3
type MailboxInfo ¶ added in v0.0.3
type RecvOption ¶ added in v0.0.3
type RecvOption struct {
Tag uint32
Mailbox string
Unseen bool
Read bool
Answered bool
Flagged bool
Deleted bool
Since string
Before string
Limit uint32
MarkAsRead bool
Subject []string
Search []string
Body []string
From []string
To []string
Cc []string
Bcc []string
Not []string
}
接收选项
type RecvResult ¶ added in v0.0.3
type SendOption ¶
type SendOption struct {
Cc []string
Bcc []string
Html bool
Attachments []Attachment
Embeds []Attachment
}
Click to show internal directories.
Click to hide internal directories.