Skip to content

Commit

Permalink
Fix bug in code to check the response from the SMTP server #5
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed Sep 13, 2024
1 parent d706428 commit a31a53b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sisimai/lhost/sendmail.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ func init() {

} else if strings.HasPrefix(e, "<<< ") {
// <<< Response from SMTP Server
if slices.Contains(esmtpreply, e[4:]) == false { esmtpreply = append(esmtpreply, e[4:]) }
isincluded := false
for _, r := range esmtpreply {
// Whether the response is included in the "estmpreply" or not
if strings.Contains(r, e[4:]) == true { isincluded = true; break }
}
if isincluded == false { esmtpreply = append(esmtpreply, e[4:]) }

} else {
// Detect an SMTP session error or a connection error
Expand Down

0 comments on commit a31a53b

Please sign in to comment.