Compare commits

..

No commits in common. "8b1208949f6d9249447208a1a4c3ad2d0a44fcb1" and "db9893f15a00c2da23b26d1a0891bbb7cd04253f" have entirely different histories.

5
eml.go
View file

@ -142,7 +142,7 @@ func parseEMLHeaders(mailHeader *netmail.Header, msg *Msg) error {
addrStrings = append(addrStrings, addr.String()) addrStrings = append(addrStrings, addr.String())
} }
if err = addrFunc(addrStrings...); err != nil { if err = addrFunc(addrStrings...); err != nil {
return fmt.Errorf(`failed to parse %q header: %w`, addrHeader, err) return fmt.Errorf(`failed to parse %q header: %w`, HeaderTo, err)
} }
} }
} }
@ -372,8 +372,7 @@ func parseMultiPartHeader(multiPartHeader string) (header string, optional map[s
headerSplit := strings.SplitN(multiPartHeader, "; ", 2) headerSplit := strings.SplitN(multiPartHeader, "; ", 2)
header = headerSplit[0] header = headerSplit[0]
if len(headerSplit) == 2 { if len(headerSplit) == 2 {
optString := strings.TrimLeft(headerSplit[1], " ") optSplit := strings.SplitN(headerSplit[1], "=", 2)
optSplit := strings.SplitN(optString, "=", 2)
if len(optSplit) == 2 { if len(optSplit) == 2 {
optional[optSplit[0]] = optSplit[1] optional[optSplit[0]] = optSplit[1]
} }