Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8623e8a

Browse files
committed
bugfix
1 parent d23a492 commit 8623e8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/logic/email.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ func (EmailLogic) SendMail(subject, content string, tos []string) (err error) {
4444
smtpAddr := emailConfig["smtp_host"] + ":" + emailConfig["smtp_port"]
4545

4646
if goutils.MustBool(emailConfig["tls"]) {
47-
err = e.Send(smtpAddr, auth)
48-
} else {
4947
tlsConfig := &tls.Config{
5048
InsecureSkipVerify: true,
5149
ServerName: emailConfig["smtp_host"],
5250
}
5351

5452
err = e.SendWithTLS(smtpAddr, auth, tlsConfig)
53+
} else {
54+
err = e.Send(smtpAddr, auth)
5555
}
5656

5757
if err != nil {

0 commit comments

Comments
 (0)