Skip to content

v0.2.6: fix issue with Base64 encoded mail parts

Compare
Choose a tag to compare
@wneessen wneessen released this 14 Aug 10:20
· 1034 commits to main since this release
c6fe75f

#37 brought up an issue, in which some mail servers would not accept mails sent via go-mail services. They returned 550 Maximum line length exceeded (see RFC 5322 2.1.1) errors. It turns out, that Go's encoding/base64 does not add line breaks when encoding data. This release adds a Base64LineBreaker struct, which satisfies the io.WriteCloser interface and makes sure that mail parts, that are base64 encoded, are properly broken up at 76 chars.

Noteworthy changes

  • c6fe75f introduces the Base64LineBreaker

Thanks to @chriselkins for bringing this to my attention!