$ go get -u github.com/team4yf/fpm-go-plugin-email
import _ "github.com/team4yf/fpm-go-plugin-email/plugin"
smtp:
host: smtp.qq.com
port: 587 # 端口
username: [email protected]
password: xxx # 这里不要写密码,密码在环境变量中保存 FPM_EMAIL_PASSWORD
name: no_reply
address: [email protected]
reply: [email protected]
keepalive: 30 # 连接保持时长
fpmApp.Execute("email.send", &fpm.BizParam{
"to": "[email protected]",
"subject": "test",
"body": "ok",
})