Skip to content

Commit

Permalink
setting InsecureSkipVerify dev env only
Browse files Browse the repository at this point in the history
  • Loading branch information
the-real-i9 committed Sep 9, 2024
1 parent 4f68ab0 commit 59aa2ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/appServices/appServices.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package appServices

import (
"crypto/tls"
"fmt"
"i9chat/helpers"
"log"
Expand All @@ -22,7 +23,7 @@ func SendMail(email string, subject string, body string) {
m.SetBody("text/html", body)

d := gomail.NewDialer("smtp.gmail.com", 465, user, pass)
// d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
d.TLSConfig = &tls.Config{InsecureSkipVerify: os.Getenv("GO_ENV") != "production"}

if err := d.DialAndSend(m); err != nil {
log.Println(err)
Expand Down

0 comments on commit 59aa2ef

Please sign in to comment.