for 4.3
This commit is contained in:
@@ -37,12 +37,12 @@ func SendMail(to string, subject string, content string) bool {
|
|||||||
status := true
|
status := true
|
||||||
|
|
||||||
mail := gomail.NewMessage()
|
mail := gomail.NewMessage()
|
||||||
mail.SetHeader("From", mail.FormatAddress("makeryangcom@foxmail.com", "MakerYang"))
|
mail.SetHeader("From", mail.FormatAddress("123456789@foxmail.com", "MakerYang"))
|
||||||
mail.SetHeader("To", to)
|
mail.SetHeader("To", to)
|
||||||
mail.SetHeader("Subject", subject)
|
mail.SetHeader("Subject", subject)
|
||||||
mail.SetBody("text/html", content)
|
mail.SetBody("text/html", content)
|
||||||
|
|
||||||
send := gomail.NewDialer("smtp.qq.com", 587, "makeryangcom@foxmail.com", "xwaacdrftozsbjgc")
|
send := gomail.NewDialer("smtp.qq.com", 587, "123456789@foxmail.com", "123456789")
|
||||||
if err := send.DialAndSend(mail); err != nil {
|
if err := send.DialAndSend(mail); err != nil {
|
||||||
status = false
|
status = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user