github wneessen/go-mail v0.3.3
[BREAKING CHANGE] v0.3.3: MiddlewareType and WriteToSkipMiddleware

latest releases: v0.7.2, v0.7.1, v0.7.0...
3 years ago

This release will break current Middleware implementations

For middlewares to be able to access the fully written mail message, we need a way to execute WriteTo without the calling middleware to be handled, otherwise we end up in an infinite loop.

This release introduces the MiddlewareType and the corresponding change of the Middleware interface. We now require to return the MiddlewareType when the Type() method on the interface is called. Conveniently MiddlewareType is an alias to a string.

This way we can also introduce the WriteToSkipMiddleware() method which takes a MiddlewareType as argument. This will allow us to use a WriteTo call with the initiating Middleware itself to be skipped.

Please note: This release will break any existing go-mail Middleware, since they don't provide a Type() method yet.

What's Changed

  • Introducing MiddlewareType and WriteToSkipMiddleware by @wneessen in #70

Full Changelog: v0.3.2...v0.3.3

Don't miss a new go-mail release

NewReleases is sending notifications on new releases.