PowerTCP Mail for .NET
DnsServers Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Smtp Class : DnsServers Property




Gets or sets the DNS servers used to resolve mail server IP Addresses.

Syntax

Visual Basic (Declaration) 
Public Property DnsServers As StringCollection
Visual Basic (Usage)Copy Code
Dim instance As Smtp
Dim value As StringCollection
 
instance.DnsServers = value
 
value = instance.DnsServers
C# 
public StringCollection DnsServers {get; set;}
Managed Extensions for C++ 
public: __property StringCollection* get_DnsServers();
public: __property void set_DnsServers( 
   StringCollection* value
);
C++/CLI 
public:
property StringCollection^ DnsServers {
   StringCollection^ get();
   void set (    StringCollection^ value);
}

Property Value

StringCollection contains a list of DNS servers used to lookup mail server information.

Remarks

Set the DnsServer property to a list of one or more DNS servers, and leave the Smtp.MailServer property empty to enable the sending of email messages directly to the recipient’s mail server.

This list is an ordered list; the first server will be attempted and if no response is received within the Smtp.DnsServerTimeout period, the next server in the list will be tried.

The system automatically populates the default DNS servers; you should only need to add to this list if the default DNS servers are not adequate.

If the message is being sent to many different recipient domains, the direct sending of messages can be many times slower than using a MailServer, since the Smtp control is now doing all the work normally done by a relay mail server.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.