|
@@ -3,11 +3,19 @@ package utils
|
|
|
import (
|
|
|
"fmt"
|
|
|
"gopkg.in/gomail.v2"
|
|
|
+ "runtime"
|
|
|
"strings"
|
|
|
)
|
|
|
|
|
|
//发送邮件
|
|
|
func SendEmail(title, content string, touser string) bool {
|
|
|
+ emailSource := ``
|
|
|
+ pc, _, line, ok := runtime.Caller(1)
|
|
|
+ if ok{
|
|
|
+ emailSource = fmt.Sprint( runtime.FuncForPC(pc).Name(), ",第", line, "行:")
|
|
|
+ }
|
|
|
+ content = fmt.Sprint(emailSource,"\n",content)
|
|
|
+
|
|
|
if RunMode == "debug" {
|
|
|
FileLog.Info(fmt.Sprint(title, ";", content))
|
|
|
return false
|