|
@@ -1,6 +1,7 @@
|
|
|
package utils
|
|
|
|
|
|
import (
|
|
|
+ "crypto/tls"
|
|
|
"strings"
|
|
|
|
|
|
"gopkg.in/gomail.v2"
|
|
@@ -49,6 +50,8 @@ func SendEmailByDw(title, content string, touser string) (result bool, err error
|
|
|
m.SetHeader("Subject", title)
|
|
|
m.SetBody("text/html", content)
|
|
|
d := gomail.NewDialer("mail.dwqh88.com", 465, "lvan@dwqh88.com", "Dwqh20248888")
|
|
|
+ d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
|
|
|
+
|
|
|
if err := d.DialAndSend(m); err != nil {
|
|
|
result = false
|
|
|
return result, err
|