Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailContent ¶
type MailContent struct { Date *time.Time From []*mail.Address To []*mail.Address Subject string Content string Attach []string }
* @description: Mail Content Struct @attribute Date: Email Date @attribute From: Email Sender @attribute To: Email Receiver @attribute Subject: Email Subject @attribute Content: Email Content @attribute Attach: Email Attach List
type MailService ¶
* @description: MailService Struct @attribute Client: IMap Client @attribute Account: Email Account @attribute Password: Email Password @attribute IsLogin: Login State
func NewMailService ¶
func NewMailService(host, account, password string) *MailService
* @description: NewMailService @param host: IMap Server @param account: Email Account @param password: Email Password @return: MailService
func (*MailService) FetchMailContent ¶
func (ms *MailService) FetchMailContent(last uint32, boxName string) ([]*MailContent, error)
* @description: Get MailContent List @param last: Last Count @param boxName: Mail Box Name @return: MailContent List
func (*MailService) FetchMailboxInfo ¶
func (ms *MailService) FetchMailboxInfo() ([]string, error)
* @description: Get MailBox List @param : None @return: MailBox List And Error
func (*MailService) Login ¶
func (ms *MailService) Login() error
* @description: Login The Email @param : None @return: error or nil
func (*MailService) Logout ¶
func (ms *MailService) Logout() error
* @description: Logout The Email @param : None @return: error or nil