QueryDNS will send DNS request to DNS server specified
in DNSHostname
property. It can be used for various tasks related to
hostnames and domains connecting to your SMTP server. For
example, you can use it to determine MX or A records for
given email, so you can fill Hostname property by
yourself.
When QueryDNS is used, it will send request to the
server. When response arrives from the server, DNSResponse
event will be fired where you can read result of your
query. If error occurs, DNSResponse event will contain
Success argument that will tell you
if your query was successful or not.
If server replies with answer that was not expected,
recursive queries are automatically resent by wodSmtp. For
example, DNS server may reply that it's not
authoritative for your query and will point you to another
DNS server. wodSmtp will automatically resend the request -
until response is received or timeout expires.
QueryDNS can be used anytime and any number of
times.