mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-23 22:20:51 +01:00
Compare commits
2 commits
db9893f15a
...
8b1208949f
Author | SHA1 | Date | |
---|---|---|---|
8b1208949f | |||
faab5323fd |
1 changed files with 4 additions and 3 deletions
5
eml.go
5
eml.go
|
@ -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`, HeaderTo, err)
|
return fmt.Errorf(`failed to parse %q header: %w`, addrHeader, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,8 @@ 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 {
|
||||||
optSplit := strings.SplitN(headerSplit[1], "=", 2)
|
optString := strings.TrimLeft(headerSplit[1], " ")
|
||||||
|
optSplit := strings.SplitN(optString, "=", 2)
|
||||||
if len(optSplit) == 2 {
|
if len(optSplit) == 2 {
|
||||||
optional[optSplit[0]] = optSplit[1]
|
optional[optSplit[0]] = optSplit[1]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue