v0.3.5: Bugfix in msgWriter error handling and GetAddrHeader #84
Closed
wneessen
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release fixes a bug in the
msgWriter
error handling as well as introduces the newGetAddrHeader
method. Thanks to @oschwald for both, the error report and the feature request.msgWriter.writeBody
method was not working properly. We basically overwrote themw.err
withnil
if the function that followed after a failed write attempt was successful again.SetHeader
andSetHeaderPreformatted
have been deprecated in favour ofSetGenHeader
andSetGenHeaderPreformatted
As pointed out in Add GetAddrHeader #80 the naming was pretty confusing, given that we already haveSetAddrHeader
.With the new naming convention it should be more clear to the user, which method to use for which action. For compatibility reasons the old methods have been kept for now but in reality they are just aliases to the new methods.
GetAddrHeader
andGetAddrHeaderString
have been introduced As requested in Add GetAddrHeader #80 analogous toGetGenHeader
we also need a similar method for the address headers. Since address headers are*mail.Address
pointer, we've also added a*String
method that will extract the address string and return a string slice instead.GetTo
,GetFrom
,GetCc
andGetBcc
(with a*String
counterpart as well). This way the user has full flexibility. Either they use the more "low-level"GetAddrHeader
method or the higher level methods for the corresponding address typeNOTE; We encourage users who use the
SetHeader
method in their code to switch toSetGenHeader
instead.What's Changed
Full Changelog: v0.3.4...v0.3.5
This discussion was created from the release v0.3.5: Bugfix in msgWriter error handling and GetAddrHeader.
Beta Was this translation helpful? Give feedback.
All reactions