From 1f5677c5f0c43baca46a64d0dddbd92bc9194746 Mon Sep 17 00:00:00 2001 From: mattbr0wn Date: Sat, 7 Dec 2024 09:38:00 +0000 Subject: [PATCH] move retry logic --- mailvalidate/email_address.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mailvalidate/email_address.go b/mailvalidate/email_address.go index 1f9242f..268e884 100644 --- a/mailvalidate/email_address.go +++ b/mailvalidate/email_address.go @@ -156,11 +156,8 @@ func handleAlternateEmail(req *EmailValidationRequest, results *EmailValidation) // handleSmtpResponses processes SMTP response codes and descriptions func handleSmtpResponses(req *EmailValidationRequest, resp *EmailValidation) { - resp.RetryValidation = true - if isNoMXRecordError(resp.SmtpResponse.Description) { resp.IsDeliverable = "false" - resp.RetryValidation = false return } @@ -204,6 +201,7 @@ func handleTemporaryFailure(req *EmailValidationRequest, resp *EmailValidation) case isBlacklistError(resp.SmtpResponse.Description): blacklisted(req, resp) case isGreylistError(resp.SmtpResponse.Description): + resp.RetryValidation = true greylisted(req, resp) case isMailboxFullError(resp.SmtpResponse.Description): handleMailboxFull(resp)