You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
569 B

2 months ago
package main
import (
"log"
"net/smtp"
"github.com/jordan-wright/email"
)
func main() {
e := email.NewEmail()
1 month ago
e.From = "lin <linquan13950405063@163.com>"
2 months ago
e.To = []string{"349589071@qq.com"}
1 month ago
e.Bcc = []string{"linquan13950405063@163.com"}
e.Subject = "【桃源记2】验证码"
e.HTML = []byte("这是桃源记2后台登录的验证码 <br><br>验证码: 713379 <br><br>请在10分钟内使用。")
err := e.Send("smtp.163.com:25", smtp.PlainAuth("", "linquan13950405063@163.com", "YGefKDbTiwMRW3nM", "smtp.163.com"))
2 months ago
if err != nil {
1 month ago
log.Print(err)
2 months ago
}
}