Feature Request: Get SMTP code /message #25
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: karolyi/py3-validate-email#25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why: Would like to know if my IP/server got blacklisted
Elaborate please?
As per the SMTP result codes you either get a 4XX in which case you can retry later, or you get a 5XX when you are denied from further retries.
If you use the (somewhat new)
63f4661fd3/validate_email/validate_email.py (L14)
, you should get anEmailValidationError
63f4661fd3/validate_email/exceptions.py (L4)
base class with the message that occurred on denial. You can go from there and see what the exact message was; but the message is for humans and not for machines to read, hence there is no simplistic way to tell if it was a blocklist error.The one with the message in the exception will be
AddressNotDeliverableError
:63f4661fd3/validate_email/mx_check.py (L97)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sorry, my apologies. for some reason, github is not sending notifications to my inbox
AddressNotDeliverableError could be based on getting the IP listed in spamhaus. in such case, will 5XX be listed as the exception?
You should get the rejection message as the exception message, yes.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.