Documentation
¶
Index ¶
- Constants
- Variables
- func NewSMTPClient(host, user, pwd string) (c *smtp.Client, e error)
- func NewSMTPSSLClient(host, user, pwd string) (c *smtp.Client, e error)
- func SendEmail(host, user, pwd, to, subject, body, mailtype string) (e error)
- func SendSSLEmail(host, user, pwd, to, subject, body, mailtype string) (e error)
- type InsecureAuth
Constants ¶
View Source
const (
// TypeHTML .
TypeHTML = "html"
)
Variables ¶
View Source
var ErrWriteBusy = errors.New("write busy")
ErrWriteBusy tcp 發送緩衝區 已滿
Functions ¶
func NewSMTPClient ¶
NewSMTPClient 創建一個 未加密 的 smtp 客戶端
func NewSMTPSSLClient ¶
NewSMTPSSLClient 創建一個 使用 tls 的 smtp 客戶端
func SendSSLEmail ¶
SendSSLEmail 使用 ssl 發送 email
Types ¶
type InsecureAuth ¶
type InsecureAuth struct {
User, Pwd string
}
InsecureAuth 非加密的 email 驗證
func (*InsecureAuth) Next ¶
func (*InsecureAuth) Next(fromServer []byte, more bool) ([]byte, error)
Next .
func (*InsecureAuth) Start ¶
func (a *InsecureAuth) Start(server *smtp.ServerInfo) (string, []byte, error)
Start .
Click to show internal directories.
Click to hide internal directories.