Skip to content

Commit

Permalink
reverted changes to the mailer To: address format
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed Aug 25, 2022
1 parent 0b8c7f6 commit 9e3c59f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/mailer/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"io"
"net/mail"
"net/smtp"
"strings"

"github.com/domodwyer/mailyak/v3"
)
Expand Down Expand Up @@ -65,10 +64,7 @@ func (m *SmtpClient) Send(
yak.FromName(fromEmail.Name)
}
yak.From(fromEmail.Address)

// wrap in brackets as workaround for spamassasin "TO_NO_BRKTS_HTML_ONLY" rule
yak.To(strings.TrimSpace(fmt.Sprintf("%s <%s>", toEmail.Name, toEmail.Address)))

yak.To(toEmail.Address)
yak.Subject(subject)
yak.HTML().Set(htmlContent)

Expand Down

0 comments on commit 9e3c59f

Please sign in to comment.