mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +01:00
Compare commits
2 commits
9e0d7a1903
...
13e5a7423c
Author | SHA1 | Date | |
---|---|---|---|
|
13e5a7423c | ||
|
1fc030afe4 |
1 changed files with 6 additions and 0 deletions
|
@ -133,6 +133,10 @@ func (e *SendError) Is(errType error) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *SendError) Unwrap() []error {
|
||||||
|
return e.errlist
|
||||||
|
}
|
||||||
|
|
||||||
// IsTemp returns true if the delivery error is of a temporary nature and can be retried.
|
// IsTemp returns true if the delivery error is of a temporary nature and can be retried.
|
||||||
//
|
//
|
||||||
// This function checks whether the SendError indicates a temporary error, which suggests
|
// This function checks whether the SendError indicates a temporary error, which suggests
|
||||||
|
@ -224,3 +228,5 @@ func (r SendErrReason) String() string {
|
||||||
func isTempError(err error) bool {
|
func isTempError(err error) bool {
|
||||||
return err.Error()[0] == '4'
|
return err.Error()[0] == '4'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ interface{ Unwrap() []error } = &SendError{}
|
||||||
|
|
Loading…
Reference in a new issue