首页 > TAG信息列表 > gomail

golang发送SMTP邮件

1、初始化项目 go mod init example.com/m/v1 go get gopkg.in/gomail.v2 go mod vendor touch main.go go run main.com 2、编写代码 package main import ( "crypto/tls" "log" "gopkg.in/gomail.v2" ) func main() { m := g