mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: option for using SSL connection in mail queue
This commit is contained in:
@@ -22,7 +22,7 @@ type SMTPConfig struct {
|
||||
Port int // 服务器端口
|
||||
User string // 用户名
|
||||
Password string // 密码
|
||||
Encryption string // 是否启用加密
|
||||
Encryption bool // 是否启用加密
|
||||
Keepalive int // SMTP 连接保留时长
|
||||
}
|
||||
|
||||
@@ -77,6 +77,11 @@ func (client *SMTP) Init() {
|
||||
d.Timeout = time.Duration(client.Config.Keepalive+5) * time.Second
|
||||
client.chOpen = true
|
||||
|
||||
// 是否启用 SSL
|
||||
if client.Config.Encryption {
|
||||
d.SSL = true
|
||||
}
|
||||
|
||||
var s mail.SendCloser
|
||||
var err error
|
||||
open := false
|
||||
|
||||
Reference in New Issue
Block a user