Skip to content

Commit df6602c

Browse files
Merge pull request #47 from Valentin-Kaiser/email
removed duplicate SMTP connection close
2 parents a4c9582 + 0bb7612 commit df6602c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mail/internal/email/email.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ func (e *Email) Send(address string, auth smtp.Auth, helo string) error {
377377
if err != nil {
378378
return apperror.NewError("could not dial SMTP connection").AddError(err)
379379
}
380-
defer apperror.Catch(conn.Close, "could not close SMTP connection")
381380

382381
// Send custom HELO
383382
err = conn.Hello(helo)
@@ -531,7 +530,6 @@ func (e *Email) SendWithStartTLS(address string, auth smtp.Auth, config *tls.Con
531530
if err != nil {
532531
return apperror.NewError("could not dial SMTP connection").AddError(err)
533532
}
534-
defer apperror.Catch(conn.Close, "could not close SMTP connection")
535533

536534
// Send custom HELO if provided (before STARTTLS)
537535
if helo != "" {

0 commit comments

Comments
 (0)