Documentation ¶
Overview ¶
used to send mail
Index ¶
Constants ¶
View Source
const ( ImapHost = "imap.exmail.qq.com" // receive mail ImapPortSecure = 993 //receive mail Smtphost = "smtp.exmail.qq.com" // send mail Smtpport = 25 // send mail Identity = "Oscar" User = "shuailong@tenxcloud.com" Pass = "xue1227xue" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Email ¶
type Email struct { Date time.Time `json:"date"` From string `json:"from"` To string `json:"to"` Subject string `json:"subject"` Content string `json:"content"` }
Email is a complete mail
type MailClient ¶
type MailClient struct {
// contains filtered or unexported fields
}
func (*MailClient) ListMailBox ¶
func (mc *MailClient) ListMailBox() ([]imap.MailboxInfo, error)
func (*MailClient) ListMails ¶
func (mc *MailClient) ListMails(mailbox string, n uint32) ([]Email, []error)
ListMails lists parsed mails and errors
func (*MailClient) ReceiveRaw ¶
func (mc *MailClient) ReceiveRaw(mailbox string, n uint32) ([]imap.Message, error)
Click to show internal directories.
Click to hide internal directories.