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