fix(deps): update module github.com/wneessen/go-mail to v0.3.7 #1348

Merged
konrad merged 1 commits from renovate/github.com-wneessen-go-mail-0.x into main 2023-01-03 14:48:58 +00:00
Member

This PR contains the following updates:

Package Type Update Change
github.com/wneessen/go-mail require patch v0.3.6 -> v0.3.7

⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


Release Notes

wneessen/go-mail

v0.3.7

Compare Source

This release introduces the SendError type which satisfies the error interface and provides a better way to identify delivery errors. A new sendError field has been added to the Msg as well, to also allow per-message error handling in bulk mailings.

We've also added different SendErrReason that indicate the different things that can go wrong during mail delivery. These reasons can be checked for, for each Msg using the errors.Is methods. Alternatively, the errors.As method can be used to unwrap the SendError to get access to it's methods. The SendError provides a IsTemp method that returns true if the delivery error is of temporary nature.

This is useful for delivery retries. For example the following code could be used to decide whether the error is retryable or not:

	if err := c.DialAndSend(m); err != nil {
		var se *mail.SendError
		if errors.As(err, &se) && se.IsTemp() {
			// retryable error
			log.Printf("temporary error, will re-try")

			/*
			  perform some re-try logic here
			*/
		}
		// permanent error
		log.Fatal(err)
	}

If the Send method runs into more than one error during delivery, these errors are accumulated and returned with the reason ErrAmbiguous, since it's not possible to exactly say what caused the error. For this it comes handy, that the *Msg now provides per-message send errors. The *Msg now has HasSendError(), SendErrorIsTemp() and SendError(). While HasSendError() simply returns a bool in case a *Msg failed during delivery and SendErrorIsTemp() returns true if it's a temporary error, the SendError() will return the full SendError error of the corresponding *Msg.

The Error() method of SendError will return a detailed error string based on the accumulated errors that were collected during the delivery.

Thanks to @​imirkin and @​iwittkau for providing valueable feedback and performing code review on the PR.

What's Changed

Full Changelog: https://github.com/wneessen/go-mail/compare/v0.3.6...v0.3.7


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/wneessen/go-mail](https://github.com/wneessen/go-mail) | require | patch | `v0.3.6` -> `v0.3.7` | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>wneessen/go-mail</summary> ### [`v0.3.7`](https://github.com/wneessen/go-mail/releases/tag/v0.3.7) [Compare Source](https://github.com/wneessen/go-mail/compare/v0.3.6...v0.3.7) This release introduces the `SendError` type which satisfies the error interface and provides a better way to identify delivery errors. A new `sendError` field has been added to the `Msg` as well, to also allow per-message error handling in bulk mailings. We've also added different `SendErrReason` that indicate the different things that can go wrong during mail delivery. These reasons can be checked for, for each `Msg` using the `errors.Is` methods. Alternatively, the `errors.As` method can be used to unwrap the `SendError` to get access to it's methods. The `SendError` provides a `IsTemp` method that returns true if the delivery error is of temporary nature. This is useful for delivery retries. For example the following code could be used to decide whether the error is retryable or not: ```go if err := c.DialAndSend(m); err != nil { var se *mail.SendError if errors.As(err, &se) && se.IsTemp() { // retryable error log.Printf("temporary error, will re-try") /* perform some re-try logic here */ } // permanent error log.Fatal(err) } ``` If the `Send` method runs into more than one error during delivery, these errors are accumulated and returned with the reason `ErrAmbiguous`, since it's not possible to exactly say what caused the error. For this it comes handy, that the `*Msg` now provides per-message send errors. The `*Msg` now has `HasSendError()`, `SendErrorIsTemp()` and `SendError()`. While `HasSendError()` simply returns a bool in case a `*Msg` failed during delivery and `SendErrorIsTemp()` returns true if it's a temporary error, the `SendError()` will return the full `SendError` error of the corresponding `*Msg`. The `Error()` method of `SendError` will return a detailed error string based on the accumulated errors that were collected during the delivery. Thanks to [@&#8203;imirkin](https://github.com/imirkin) and [@&#8203;iwittkau](https://github.com/iwittkau) for providing valueable feedback and performing code review on the PR. #### What's Changed - Introduction of new error type for sending errors by [@&#8203;wneessen](https://github.com/wneessen) in https://github.com/wneessen/go-mail/pull/91 **Full Changelog**: https://github.com/wneessen/go-mail/compare/v0.3.6...v0.3.7 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDAuMiIsInVwZGF0ZWRJblZlciI6IjMyLjI0MC4yIn0=-->
renovate added the
dependencies
label 2023-01-03 11:01:43 +00:00
renovate added 1 commit 2023-01-03 11:01:44 +00:00
konrad merged commit 80634d43c1 into main 2023-01-03 14:48:58 +00:00
konrad deleted branch renovate/github.com-wneessen-go-mail-0.x 2023-01-03 14:48:58 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1348
No description provided.