package main import ( "fmt" "github.com/quenlang/mahonia" "net/smtp" ) func main() { auth := smtp.PlainAuth("", "[email protected]", "xxxx", "smtp.exmail.qq.com") str1 := "申请升级report-app报表" str2 := "7.概览页数据格式bug引起评分详情展示空白(昨晚上的500异常是由于此处的js页面缓存导致参数没有正常请求到后端,并且后端没有兼容请求参数。)" enc := mahonia.NewEncoder("gbk") to := []string{"[email protected]"} msg := []byte("To: [email protected]\r\n" + "From: [email protected]\r\n" + enc.ConvertString(str2) + "\r\n") err := smtp.SendMail("smtp.exmail.qq.com:25", auth, "[email protected]", to, msg) if err != nil { fmt.Println(err) } }
时间: 2024-10-29 05:59:20