Skip to content

Commit

Permalink
Update smtp.go
Browse files Browse the repository at this point in the history
Signed-off-by: kannan-nic <[email protected]>
  • Loading branch information
kannan-nic authored May 2, 2024
1 parent 1e2031a commit cc43139
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions connector/smtp/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,7 @@ func (sc *smtpConnector) Login(ctx context.Context, _ connector.Scopes, username

var conn net.Conn

if strings.Contains(p, "tls") {
sc.cfg.Host = sc.cfg.Host[0 : len(sc.cfg.Host)-3]
p = p[0 : len(p)-3]
tlsconfig := &tls.Config {
InsecureSkipVerify: true,
ServerName: h,
}
conn, err = tls.Dial("tcp", sc.cfg.Host, tlsconfig)
if err != nil {
return
}
} else if p == "" || p == "465" {
if p == "" || p == "465" {
conn, err = tls.Dial("tcp", sc.cfg.Host, nil)
if err != nil {
return

Check failure on line 44 in connector/smtp/smtp.go

View workflow job for this annotation

GitHub Actions / Lint

naked return in func `Login` with 75 lines of code (nakedret)
Expand Down

0 comments on commit cc43139

Please sign in to comment.