Skip to content

Commit

Permalink
Fix: user encryption setting will now overwrite the default one in go…
Browse files Browse the repository at this point in the history
  • Loading branch information
HFO4 committed Apr 25, 2021
1 parent 96712fb commit 641fe35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets
3 changes: 2 additions & 1 deletion pkg/email/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ func (client *SMTP) Init() {
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
client.chOpen = true

// 是否启用 SSL
d.SSL = false
if client.Config.Encryption {
d.SSL = true
}
d.StartTLSPolicy = mail.OpportunisticStartTLS

var s mail.SendCloser
var err error
Expand Down

0 comments on commit 641fe35

Please sign in to comment.