kefu/tools/smtp_test.go

17 lines
335 B
Go

package tools
import (
"fmt"
"log"
"testing"
)
func TestSendSmtp(t *testing.T) {
for i := 0; i < 1; i++ {
body := fmt.Sprintf("<h1>hello,body %d</h1>", i)
subject := fmt.Sprintf("hello subject %d", i)
err := SendSmtp("smtp.qq.com:465", "xxxx@qq.com", "xxxx", []string{"xxxx@qq.com"}, subject, body)
log.Println(err)
}
}