1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-06 17:39:57 +02:00

synced with master

This commit is contained in:
Gani Georgiev
2022-08-25 16:50:28 +03:00
11 changed files with 15 additions and 19 deletions

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)