Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailClient ¶
type MailClient struct {
Account string
Password string
StartTime string //开通时间,申请邮箱6个月密码过期
MailServer string
Port int
Debug bool
Admins []string
// contains filtered or unexported fields
}
func NewMailClient ¶
func (*MailClient) SendEmailToAdmin ¶
func (mc *MailClient) SendEmailToAdmin(content string, subject ...string) error
func (*MailClient) SendEmailToUser ¶
type PostOffice ¶
type PostOffice interface {
ReciveMail(Message)
}
func NewPostOffice ¶
func NewPostOffice(server, port, username, password string) PostOffice
NewPostOffice 建立一个邮局
type Postman ¶
type Postman interface {
SendMail(string)
}
Postman 邮差的工作内容
func HirePostman ¶
func HirePostman(message Message, PostOffice PostOffice) Postman
HirePostman 招聘一名专职邮差负责向 PostOffice 投递 Message
Click to show internal directories.
Click to hide internal directories.