Update mail.go

This commit is contained in:
Lizandro Guarnizo
2026-05-13 22:50:12 -05:00
parent e94f9ee1f4
commit 7b64f33f72
+2 -1
View File
@@ -48,7 +48,8 @@ func (m *Mail) Send(to string, subject string, body string, ccEmails ...string)
fromName = os.Getenv("MAIL_FROM_NAME")
}
fromHeader := from
if fromName != "" {
// Solo usar "Nombre <email>" si el nombre no es una dirección de email ni igual al from
if fromName != "" && fromName != from && !strings.Contains(fromName, "@") {
fromHeader = fmt.Sprintf("%s <%s>", fromName, from)
}