Update mail.go
This commit is contained in:
+2
-1
@@ -48,7 +48,8 @@ func (m *Mail) Send(to string, subject string, body string, ccEmails ...string)
|
|||||||
fromName = os.Getenv("MAIL_FROM_NAME")
|
fromName = os.Getenv("MAIL_FROM_NAME")
|
||||||
}
|
}
|
||||||
fromHeader := from
|
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)
|
fromHeader = fmt.Sprintf("%s <%s>", fromName, from)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user