e.g:
{
"Enable": true,}
{
"Enable": true,
"To": ["xxxxxx@163.com"],
"#HttpAPI": "如有此字段,则按 http api 方式发送",
"#Keepalive": "如果此时间段内没有邮件发送,则关闭 SMTP 连接,单位/秒",
"Keepalive": 60,
"#doc": "https://godoc.org/github.com/go-gomail/gomail#Dialer",
"Host": "smtp.qq.com",
"Port": 465,
"Username": "xxxxxx@qq.com",
"Password": "此处填授权码",
"SSL": true,
"#LocalName": "LocalName is the hostname sent to the SMTP server with the HELO command. By default, 'localhost' is sent.",
"LocalName": ""
}
如果有防火墙的话需要开启25端口,不然代发邮件可能不成功。