mirror of https://github.com/bjdgyc/anylink.git
发送邮件增加ssl功能
This commit is contained in:
parent
73d1edd62f
commit
dd83b330eb
|
@ -124,6 +124,13 @@ sh bridge-init.sh
|
||||||
|
|
||||||
相关软件下载: https://gitee.com/bjdgyc/anylink-soft
|
相关软件下载: https://gitee.com/bjdgyc/anylink-soft
|
||||||
|
|
||||||
|
## Discussion
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
添加QQ群: 567510628
|
||||||
|
|
||||||
|
|
||||||
## Other Screenshot
|
## Other Screenshot
|
||||||
|
|
||||||

|

|
||||||
|
|
|
@ -68,7 +68,9 @@ func SendMail(subject, to, htmlBody string) error {
|
||||||
server.Port = dataSmtp.Port
|
server.Port = dataSmtp.Port
|
||||||
server.Username = dataSmtp.Username
|
server.Username = dataSmtp.Username
|
||||||
server.Password = dataSmtp.Password
|
server.Password = dataSmtp.Password
|
||||||
// server.Encryption = mail.EncryptionTLS
|
if dataSmtp.UseSSl {
|
||||||
|
server.Encryption = mail.EncryptionSSL
|
||||||
|
}
|
||||||
|
|
||||||
// Since v2.3.0 you can specified authentication type:
|
// Since v2.3.0 you can specified authentication type:
|
||||||
// - PLAIN (default)
|
// - PLAIN (default)
|
||||||
|
|
|
@ -2,5 +2,5 @@ package base
|
||||||
|
|
||||||
const (
|
const (
|
||||||
APP_NAME = "AnyLink"
|
APP_NAME = "AnyLink"
|
||||||
APP_VER = "0.0.8"
|
APP_VER = "0.0.9"
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,13 +18,15 @@ type GroupLinkAcl struct {
|
||||||
// 自上而下匹配 默认 allow * *
|
// 自上而下匹配 默认 allow * *
|
||||||
Action string `json:"action"` // allow、deny
|
Action string `json:"action"` // allow、deny
|
||||||
Val string `json:"val"`
|
Val string `json:"val"`
|
||||||
Port uint8 `json:"port"`
|
Port uint16 `json:"port"`
|
||||||
IpNet *net.IPNet `json:"ip_net"`
|
IpNet *net.IPNet `json:"ip_net"`
|
||||||
|
Note string `json:"note"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ValData struct {
|
type ValData struct {
|
||||||
Val string `json:"val"`
|
Val string `json:"val"`
|
||||||
IpMask string `json:"ip_mask"`
|
IpMask string `json:"ip_mask"`
|
||||||
|
Note string `json:"note"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Group struct {
|
type Group struct {
|
||||||
|
|
|
@ -38,6 +38,7 @@ type SettingSmtp struct {
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
From string `json:"from"`
|
From string `json:"from"`
|
||||||
|
UseSSl bool `json:"use_ssl"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingOther struct {
|
type SettingOther struct {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue