This commit is contained in:
2026-08-16 22:38:44 +08:00
parent 1945d34894
commit 560ae46b82
19 changed files with 345 additions and 112 deletions
-7
View File
@@ -79,13 +79,6 @@ func (r *emailRepo) Send(ctx context.Context, to []string, subject, body string)
return err
}
defer client.Close()
if !config.IsSsl {
if supported, _ := client.Extension("STARTTLS"); supported {
if err = client.StartTLS(&tls.Config{ServerName: config.Host, MinVersion: tls.VersionTLS12}); err != nil {
return err
}
}
}
var auth smtp.Auth
if config.IsLoginAuth {
auth = &loginAuth{username: config.From, password: config.Secret}