Golang如何发送SMTP邮件 go get gopkg.in/gomail.v2 package main import ( "gopkg.in/gomail.v2" "log" ) func main() { // 设置邮件服务器信息 d := gomail.NewDialer(