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.
21 lines
569 B
21 lines
569 B
package main |
|
|
|
import ( |
|
"log" |
|
"net/smtp" |
|
|
|
"github.com/jordan-wright/email" |
|
) |
|
|
|
func main() { |
|
e := email.NewEmail() |
|
e.From = "lin <linquan13950405063@163.com>" |
|
e.To = []string{"349589071@qq.com"} |
|
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")) |
|
if err != nil { |
|
log.Print(err) |
|
} |
|
}
|
|
|