DNSServers Collection (Dundas Mailer Control 1.0)

Dundas

DNSServers Collection (Dundas Mailer Control 1.0)

Stores DNSServer objects. This collection is 0-based and determines the DNS server(s) which will perform the DNS lookups necessary to send the email message if SMTP relay servers are not being used.

Remarks

This collection specifies the DNS server(s) to be used if the email is being sent directly to the destination server.

The DNSServers collection supports the following methods and properties:

  • Add(Name as string, TCPIP as long, UDP as long). Adds a DNSServer object to the collection.

  • Remove(Index). Removes a particular object from the collection.

  • Count (read-only property). The number of DNSServer objects stored in the collection.

  • Item(Index). Used to retrieve a particular object from the collection.

  • Clear(). Removes all objects from the collection.

The Index argument can be either a zero-based numerical index or a string key. The string key is defined by the Name argument.

If the SMTPRelayServers collection is empty then the email message is sent directly to the destination server, so a DNS server is required to determine where the message is to be sent. However, if the SMTPRelayServers collection is not empty then the message is sent using the specified relay server, and the DNSServers collection is ignored since the relay server is responsible for determining where the message is being sent to. If both the SMTPRelayServers and DNSServers collections are empty the DNS server to be used defaults to "A.ROOT-SERVERS.NET". If this fails "B.ROOT-SERVERS.NET" will be tried. If this too fails then "C.ROOT-SERVERS.NET" will be tried. If all of these fail then the mail operation will fail as well.

Note that the first server in the collection will be tried first. If it is not available the next DNSServer object will be tried, and so on and so forth.

There are two (2) methods of connecting to a DNS server: using the TCP/IP protocol and using the UDP protocol. Different DNS servers may support either protocol or both protocols. By default the TCP/IP method is tried first. If this fails we then attempt to contact the server using UDP. However, if you know what protocols your specified DNS servers use you can optimize the DNS lookup operations by specifying which protocol to use when working with the DNS server(s).

This collection may be used by all send mail functions (as well as PostArticle), depending on whether SMTP relay servers are being used or not.

See Also: DNSServer Object | Add Method | Remove Method | Clear Method | Item Method | Count Property | SMTPRelayServers Collection