mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-18 17:46:37 +08:00
fix: Remove InsecureSkipVerify option in TLS config for
email sending.
This commit is contained in:
parent
a5a3ca2b81
commit
f979181b5f
@ -24,8 +24,8 @@ func SendEmail(subject string, receiver string, content string) error {
|
||||
var err error
|
||||
if SMTPPort == 465 {
|
||||
tlsConfig := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
ServerName: SMTPServer,
|
||||
// InsecureSkipVerify: true,
|
||||
ServerName: SMTPServer,
|
||||
}
|
||||
conn, err := tls.Dial("tcp", fmt.Sprintf("%s:%d", SMTPServer, SMTPPort), tlsConfig)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user