Charset support has been added in the 'Part' struct. A 'SetCharset' method and a 'WithPartCharset' option have been added to override the default Part charset. The 'writePart' function in msgWriter now accommodates the charset defined at the Part level, defaulting to the previous functionality if not set.
Extended null check conditions in msgwriter.go to prevent potential nil pointer dereference. This change ensures robustness in error handling in scenarios where FROM header or envelope FROM is either not existent or nil.
In the updated version of msgwriter.go, an additional error handling process has been included. If an error is detected when creating a new part in the message writer, this error is stored and prevents executing the writeBody function. This fixes nil pointer dereference in `mw.writeBody` if an error occured previously.
This PR introduces a new struct field for the message parts: `del`
If the del flag is set to `true`, the msgWriter will ignore this part during the writing process.
Additionally, the `part` has now a `Delete` method that lets the user mark the part as deleted
This allows middleware to take further control of the Msg and is part of #107
The error handling in the msgWriter.writeBody() method was not working properly. We basically overwrote the mw.err with nil if the function that followed after a failed write attempt was successful again
This patch fixes#81
With the SetHeaderPreformatted() method we have the ability to set headers that are already preformatted by the user and will not be altered in the mail message output
By default, the encoding/base64 in Go does not add line breaks to its output.
This patch introduces the Base64LineBreaker which satisfies the io.WriteCloser interface
Attachments are now correctly broken up into maximum of 76 chars
# SUMMARY
* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses:
* Unused licenses:
* Used licenses: CC0-1.0, MIT
* Read errors: 0
* Files with copyright information: 45 / 45
* Files with license information: 45 / 45
Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)
- Added `EnvelopeFrom()` and `EnvelopeFromFormat()` methods analogous to the `From()` `FromFormat()` methods
- Changed MsgWriter logic for envelope from addresses
- Adjusted `Msg.GetSender()` to return the envelope from first and only mail body from if the envelope is not set
- The writeHeader() method wasn't producing good output for long headers. This has been fixed
- Added a VERSION string to the library
- If both no User-Agent and no X-Mailer header are set, the lib adds a default UA-header