Documentation ¶ Index ¶ type Client func NewClient(smtpServer, username, password string, useAuth bool) *Client func (c *Client) Send(to, subject, body string) error func (c *Client) SendWithAttachment(to, subject, body string, files []string) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Client ¶ type Client struct { // contains filtered or unexported fields } Client 邮件客户端 func NewClient ¶ func NewClient(smtpServer, username, password string, useAuth bool) *Client NewClient 创建邮件客户端 func (*Client) Send ¶ func (c *Client) Send(to, subject, body string) error Send 发送普通文本邮件 func (*Client) SendWithAttachment ¶ func (c *Client) SendWithAttachment(to, subject, body string, files []string) error SendWithAttachment 发送带附件的邮件 Source Files ¶ View all Source files email.go Click to show internal directories. Click to hide internal directories.