mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-02 20:14:02 +08:00
This commit is contained in:
2
assets
2
assets
Submodule assets updated: 08a301d53a...997b73312a
@ -77,11 +77,12 @@ func (client *SMTP) Init() {
|
|||||||
d := mail.NewDialer(client.Config.Host, client.Config.Port, client.Config.User, client.Config.Password)
|
d := mail.NewDialer(client.Config.Host, client.Config.Port, client.Config.User, client.Config.Password)
|
||||||
d.Timeout = time.Duration(client.Config.Keepalive+5) * time.Second
|
d.Timeout = time.Duration(client.Config.Keepalive+5) * time.Second
|
||||||
client.chOpen = true
|
client.chOpen = true
|
||||||
|
|
||||||
// 是否启用 SSL
|
// 是否启用 SSL
|
||||||
|
d.SSL = false
|
||||||
if client.Config.Encryption {
|
if client.Config.Encryption {
|
||||||
d.SSL = true
|
d.SSL = true
|
||||||
}
|
}
|
||||||
|
d.StartTLSPolicy = mail.OpportunisticStartTLS
|
||||||
|
|
||||||
var s mail.SendCloser
|
var s mail.SendCloser
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
Reference in New Issue
Block a user