修改邮件提示文案数量
This commit is contained in:
parent
93b4333add
commit
c276846a65
11
main.go
11
main.go
@ -453,8 +453,8 @@ func batchDataInsert(fileName string) {
|
||||
}
|
||||
|
||||
dataBatchDuplicate = make([]BatchDataDuplicateLog, 0, batchSize)
|
||||
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ func batchDataInsert(fileName string) {
|
||||
dataBatchDuplicate = make([]BatchDataDuplicateLog, 0, batchSize)
|
||||
}
|
||||
subject := "丝芙兰数据包处理完成"
|
||||
body := "数据包:" + fileName + ";\n总数:" + strconv.Itoa(count-bi) + ";\n过滤重复数:" + strconv.Itoa(bi) + ";\n过滤后总数:" + strconv.Itoa(count) + ";\n处理完成,请前往管理平台查看处理。"
|
||||
body := "数据包:" + fileName + ";\n总数:" + strconv.Itoa(count+bi) + ";\n过滤重复数:" + strconv.Itoa(bi) + ";\n过滤后总数:" + strconv.Itoa(count) + ";\n处理完成,请前往管理平台查看处理。"
|
||||
err = SendEmail(subject, body) //发送邮件
|
||||
if err != nil {
|
||||
applogger.Info("邮件发送失:%d", err)
|
||||
@ -547,17 +547,13 @@ func SendEmail(subject string, body string) error {
|
||||
smtpPort := 465
|
||||
from := "chejiulong@wemediacn.com"
|
||||
password := "hdQfpav4x8LwbJPH"
|
||||
//from := "auto_system@wemediacn.com"
|
||||
//password := "EJkp39HCajDhpWsx"
|
||||
to := []string{"chejiulong@wemediacn.com", "99779212@qq.com", "wangyuanbing@wemediacn.com"}
|
||||
|
||||
to := []string{"chejiulong@wemediacn.com", "wangyuanbing@wemediacn.com"}
|
||||
// 邮件内容
|
||||
m := gomail.NewMessage()
|
||||
m.SetHeader("From", from)
|
||||
m.SetHeader("To", to...)
|
||||
m.SetHeader("Subject", subject)
|
||||
m.SetBody("text/plain", body)
|
||||
|
||||
// 邮件发送
|
||||
d := gomail.NewDialer(smtpHost, smtpPort, from, password)
|
||||
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
@ -566,6 +562,5 @@ func SendEmail(subject string, body string) error {
|
||||
panic(err)
|
||||
//return
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user