diff --git a/senderror.go b/senderror.go index 264a318..ea6e633 100644 --- a/senderror.go +++ b/senderror.go @@ -7,7 +7,6 @@ package mail import ( "errors" "fmt" - "strconv" "strings" ) @@ -132,12 +131,5 @@ func (r SendErrReason) String() string { // isTempError checks the given SMTP error and returns true if the given error is of temporary nature // and should be retried func isTempError(e error) bool { - ec, err := strconv.Atoi(e.Error()[:3]) - if err != nil { - return false - } - if ec >= 400 && ec <= 500 { - return true - } - return false + return e.Error()[0] == '4' }