package main
import (
"fmt"
"github.com/gogf/gf/net/gsmtp"
)
func main() {
sm := gsmtp.New("smtp.qq.com:587", "xxx@qq.com", "授权码")
err := sm.SendMail("发送方邮箱", "接收方邮箱", "subject", "body, <font color=red>red</font>")
if err != nil {
fmt.Println(err)
}
}
网友评论