发送邮件增加ssl功能

This commit is contained in:
bjd 2021-01-22 10:55:49 +08:00
parent 73d1edd62f
commit dd83b330eb
6 changed files with 15 additions and 3 deletions

View File

@ -124,6 +124,13 @@ sh bridge-init.sh
相关软件下载: https://gitee.com/bjdgyc/anylink-soft
## Discussion
![qq.png](https://gitee.com/bjdgyc/anylink/raw/master/screenshot/qq.png)
添加QQ群: 567510628
## Other Screenshot
![system.jpg](https://gitee.com/bjdgyc/anylink/raw/master/screenshot/system.jpg)

View File

@ -68,7 +68,9 @@ func SendMail(subject, to, htmlBody string) error {
server.Port = dataSmtp.Port
server.Username = dataSmtp.Username
server.Password = dataSmtp.Password
// server.Encryption = mail.EncryptionTLS
if dataSmtp.UseSSl {
server.Encryption = mail.EncryptionSSL
}
// Since v2.3.0 you can specified authentication type:
// - PLAIN (default)

View File

@ -2,5 +2,5 @@ package base
const (
APP_NAME = "AnyLink"
APP_VER = "0.0.8"
APP_VER = "0.0.9"
)

View File

@ -18,13 +18,15 @@ type GroupLinkAcl struct {
// 自上而下匹配 默认 allow * *
Action string `json:"action"` // allow、deny
Val string `json:"val"`
Port uint8 `json:"port"`
Port uint16 `json:"port"`
IpNet *net.IPNet `json:"ip_net"`
Note string `json:"note"`
}
type ValData struct {
Val string `json:"val"`
IpMask string `json:"ip_mask"`
Note string `json:"note"`
}
type Group struct {

View File

@ -38,6 +38,7 @@ type SettingSmtp struct {
Username string `json:"username"`
Password string `json:"password"`
From string `json:"from"`
UseSSl bool `json:"use_ssl"`
}
type SettingOther struct {

BIN
screenshot/qq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB