Documentation ¶
Index ¶
- func SendHtmlMail(addr string, port int, username, password string, from *From, ...) error
- func SendHtmlMailWithAttach(addr string, port int, username, password string, from *From, ...) error
- func SendMail(addr string, port int, username, password string, from *From, ...) error
- func SendMailCode(addr string, port int, username, password string, from *From, ...) (string, error)
- func SendMailWithAttach(addr string, port int, username, password string, from *From, ...) error
- type Domail
- func (s *Domail) Send() error
- func (s *Domail) SetAttach(filepath string) *Domail
- func (s *Domail) SetAttachWithSetting(filepath string, filesetting gomail.FileSetting) *Domail
- func (s *Domail) SetHeader(from *From, to, subject string) *Domail
- func (s *Domail) SetHtmlBody(body string) *Domail
- func (s *Domail) SetTextBody(body string) *Domail
- type From
- type Receive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendHtmlMail ¶
func SendHtmlMail(addr string, port int, username, password string, from *From, receives []Receive, subject, body string) error
发送html邮件
func SendHtmlMailWithAttach ¶
func SendHtmlMailWithAttach(addr string, port int, username, password string, from *From, receives []Receive, subject, body, filepath string) error
发送携带附件的HTML邮件
func SendMail ¶
func SendMail(addr string, port int, username, password string, from *From, receives []Receive, subject, body string) error
发送文本邮件
Types ¶
type Domail ¶
type Domail struct { M *gomail.Message D gomail.SendCloser }
func (*Domail) SetAttachWithSetting ¶
func (*Domail) SetHtmlBody ¶
func (*Domail) SetTextBody ¶
Click to show internal directories.
Click to hide internal directories.