mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
Fix erroneous header name in error message
The error message previously referenced a constant 'HeaderTo' which might not always be the header being parsed. The commit replaces this with 'addrHeader', significantly improving the accuracy of error messages.
This commit is contained in:
parent
db9893f15a
commit
faab5323fd
1 changed files with 1 additions and 1 deletions
2
eml.go
2
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue