NoMXRecord means that there is no MX record for the domain of the
provided email address.
There are 3 AddressValidator methods you can use to validate email address:
- ValidateFormat - Validates email address format only.
- ValidateMX - Validates email address format and the existence of MX record.
- Validate - Validates email address format, existence of MX record, and SMTP connection.
We need to determine whether the email address being used to send the email message to exists or not.
My question is why?
There is no 100% reliable way of detecting, if email address is valid.
Before attempting to send you should validate format only (validation of MX record
existence is as far as you should go).
Then simply send a message:
you'll either get a SMTP error if your SMTP server immediately rejects the address,
-or- a bounce if there is a failure at some later stage.
Consider using VERP to easily process bounces:
https://www.limilabs.com/blog/verp-variable-envelope-return-path-net