0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-25 23:12:38 +01:00

Fix send mail bug (#35834)

backport #35833
This commit is contained in:
Lunny Xiao 2025-11-03 11:33:34 -08:00 committed by GitHub
parent ac69bf8ab9
commit 5ffd1e04ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ func (s *SMTPSender) Send(from string, to []string, msg io.WriterTo) error {
return fmt.Errorf("failed to issue MAIL command: %w", err)
}
} else {
if err = client.Mail(from); err != nil {
if err = client.Mail(fmt.Sprintf("<%s>", from)); err != nil {
return fmt.Errorf("failed to issue MAIL command: %w", err)
}
}