From d39b65deb767d2aae94ba13a4b6ce2e0f3bd8bbb Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sun, 9 Jul 2023 22:33:47 +1200 Subject: [PATCH] Fix typos --- server/apiv1/swagger.go | 8 ++++---- server/smtpd/smtp.go | 1 + server/smtpd/smtpd.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/apiv1/swagger.go b/server/apiv1/swagger.go index b6b66fd..4c259cd 100644 --- a/server/apiv1/swagger.go +++ b/server/apiv1/swagger.go @@ -67,7 +67,7 @@ type releaseMessageRequest struct { To []string `json:"to"` } -// Binary data reponse inherits the attachment's content type +// Binary data response inherits the attachment's content type // swagger:response BinaryResponse type binaryResponse struct { // in: body @@ -81,7 +81,7 @@ type textResponse struct { Body string } -// Error reponse +// Error response // swagger:response ErrorResponse type errorResponse struct { // The error message @@ -89,10 +89,10 @@ type errorResponse struct { Body string } -// Plain text "ok" reponse +// Plain text "ok" response // swagger:response OKResponse type okResponse struct { - // Default reponse + // Default response // in: body Body string } diff --git a/server/smtpd/smtp.go b/server/smtpd/smtp.go index 9f841ab..c1ae624 100644 --- a/server/smtpd/smtp.go +++ b/server/smtpd/smtp.go @@ -82,6 +82,7 @@ func Send(from string, to []string, msg []byte) error { return fmt.Errorf("error response to AUTH command: %s", err.Error()) } } + if err = c.Mail(from); err != nil { return fmt.Errorf("error response to MAIL command: %s", err.Error()) } diff --git a/server/smtpd/smtpd.go b/server/smtpd/smtpd.go index 4460d12..fad74e9 100644 --- a/server/smtpd/smtpd.go +++ b/server/smtpd/smtpd.go @@ -74,7 +74,7 @@ func mailHandler(origin net.Addr, from string, to []string, data []byte) error { if replaced { return r } - replaced = true // only replace first occurence + replaced = true // only replace first occurrence return re.ReplaceAll(r, []byte("${1}Bcc: "+strings.Join(missingAddresses, ", ")+", ")) })