email

package
v0.0.0-...-bd7d7c7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 8 Imported by: 0

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

type MailService struct {
	Client   *client.Client
	Account  string
	Password string
	IsLogin  bool
}

* @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

Jump to

Keyboard shortcuts

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