1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2024-11-28 10:03:42 +02:00

reverted changes to the mailer To: address format

This commit is contained in:
Gani Georgiev 2022-08-25 10:59:55 +03:00
parent 0b8c7f6883
commit 9e3c59f966

View File

@ -5,7 +5,6 @@ import (
"io"
"net/mail"
"net/smtp"
"strings"
"github.com/domodwyer/mailyak/v3"
)
@ -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)