当前位置: 首页 > 工具软件 > cronsun > 使用案例 >

cronsun smtp 代发邮件 配置

邹高懿
2023-12-01

e.g:

{

    "Enable": true,
    "To": ["xxxxx@qq.com"],
    "#HttpAPI": "如有此字段,则按 http api 方式发送",
    "#Keepalive": "如果此时间段内没有邮件发送,则关闭 SMTP 连接,单位/秒",
    "Keepalive": 60,
    "#doc": "https://godoc.org/github.com/go-gomail/gomail#Dialer",
    "Host": "smtp.163.com",
    "Port": 465,
    "Username": "xxxxxxx@163.com",
    "Password": "此处填授权码",
    "SSL": true,
    "#LocalName": "LocalName is the hostname sent to the SMTP server with the HELO command. By default, 'localhost' is sent.",
    "LocalName": ""

}

{
    "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端口,不然代发邮件可能不成功。 


 类似资料: