DnsCache Class
Provides properties and methods which allow the developer to control whether and how MailBee will cache DNS MX (and some other) records when performing DNS MX lookup and TXT queries.
Inheritance Hierarchy
SystemObject
  MailBee.DnsMXDnsCache

Namespace: MailBee.DnsMX
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public class DnsCache

The DnsCache type exposes the following members.

Methods
  NameDescription
Public methodStatic memberClear
Removes all existing entries from the DNS cache.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyStatic memberCount
Gets the number of DNS records already in the cache.
Public propertyStatic memberEnabled
Gets or sets whether DNS records caching should be used.
Public propertyStatic memberSmtpMXMaxFailureCount
Gets or sets the maximum number of seriated failures of the SMTP MX server required in order to consider the SMTP MX server down.
Public propertyStatic memberSmtpMXNextAttemptInterval
Gets or sets the amount of time (in milliseconds) the failed SMTP MX server spends in quarantine.
Public propertyStatic memberTimeout
Gets or sets the interval which specifies for how long DNS records in the cache remain actual.
Top
Remarks

By default, DNS MX caching is enabled which may greatly increase performance of "direct send" operations which involve sending large amounts of e-mails directly to end recipients mail servers (without using SMTP relay server).

MailBee also maintains TXT and PTR records cache. TXT records are used for DomainKeys sender verification (a sort of antispam technology). Checking PTR records (reverse DNS) of the IP address from which the e-mail came (extracted from MailMessage.TimeStamps[0].From) is another method of sender verification.

Note Note
DNS cache maintained by DnsCache class is shared by all instances of Smtp objects within the application domain.
See Also