Documentation ¶
Overview ¶
examples/demo5/login.go
Index ¶
Constants ¶
View Source
const Hostname = "smtp.qq.com"
View Source
const SenderPass = "123456"
View Source
const SenderUser = "1060656096@qq.com"
Variables ¶
View Source
var SendLoginEmail = func(user string) { msg := fmt.Sprintf("%s, Welcome to login", user) auth := smtp.PlainAuth("", SenderUser, SenderPass, Hostname) if err := smtp.SendMail(Hostname, auth, SenderUser, []string{user}, []byte(msg)); err != nil { log.Printf("smtp.SendMail(%s) failed: %s", user, err) } }
发送邮件
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.