Global Class
Provides properties specifying default values and parameter settings which apply to instances of all MailBee classes.
Inheritance Hierarchy

Namespace: MailBee
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.3.1 build 666 for .NET 4.5
public class Global

The Global type exposes the following members.

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.)
Public propertyStatic memberAutodetectPortAndSslMode
Gets or sets whether MailBee should override SSL mode and/or port to use when it detects well-known mail server hostname (like or port number (like 995).
Public propertyStatic memberDefaultCulture
Gets or sets the default CultureInfo to be used for string comparisons and conversions.
Public propertyStatic memberDefaultEncoding
Gets or sets the default Encoding to be used for byte-to-string and string-to-byte conversions when no encoding is specified.
Public propertyStatic memberDefaultServerName
Gets or sets the default mail server name to be used when no server name specified.
Public propertyStatic memberDefaultTimeout
Gets or sets the default timeout value (in milliseconds) of all MailBee classes which allow the developer to set timeout value.
Public propertyStatic memberDnsMaxFailureCount
Gets or sets the maximum number of seriated failures of the DNS server required in order to consider the DNS server down.
Public propertyStatic memberDnsNextAttemptInterval
Gets or sets the amount of time (in milliseconds) the failed DNS server spends in quarantine.
Public propertyStatic memberDnsPort
Gets or sets the port on which to communicate with DNS servers.
Public propertyStatic memberDnsServers
Gets the list of DNS servers to use in addition to any DNS servers in the config file.
Public propertyStatic memberFipsMode
Gets or sets if MailBee must disable security algorithms which are not FIPS-compliant.
Public propertyStatic memberFixBadDates
Gets or sets if MailBee should attempt to fix bad datetime values instead of throwing an exception.
Public propertyStatic memberCode exampleLicenseKey
Assigns the license key.
Public propertyStatic memberLocalSmtpMXServerName
Gets or sets the default SMTP MX server name to be used to send mail in direct send mode to the recipients whose e-mail address contains no domain part.
Public propertyStatic memberMaxMultiLineDataLength
Gets or sets the maximum length (in bytes) of the multi-line data (request to a server or response from a server) which will be inserted into the log without truncation.
Public propertyStatic memberPipelining
Gets or sets whether pipelining (joining commands in batches) must be enabled by default.
Public propertyStatic memberPreferIPv4Hosts
Gets or sets whether MailBee should try to connect to IPv4 endpoints before IPv6 endpoints when connecting to mail servers.
Public propertyStatic memberPreserveMimePartOrder
Gets or sets whether MailBee should put plain-text and HTML part before any other text parts.
Public propertyStatic memberPrivateDataCover
Gets or sets the string to be used instead of the actual password data in the log when HidePasswords is true.
Public propertyStatic memberSafeMode
Gets or sets whether safe mode (prefer compatibility instead of performance) must be ENABLED by default.
Public propertyStatic memberTcpBufSize
Gets or sets the default size (in bytes) of TCP buffer.
Public propertyStatic memberUnwrappedLineLengthLimit
Gets or sets the minimum length of a line which needs wrapping.
Public propertyStatic memberVersion
Gets the version of the MailBee assembly.

The most important property in this class is LicenseKey which unlocks MailBee.NET Objects.

Changes of the property values of this class affect all MailBee classes in the current application domain. For instance, if DnsPort is set to 42, all subsequent DNS MX lookup queries will be initiated on port 42. Or, if DefaultTimeout is set to 500, all subsequent connections will use 0.5 seconds as a timeout value (however, any connections which are already open will still use their current timeout settings).

Note Note
If you're Visual Basic developer, you need to use fully qualified name when accessing properties of this class. For instance, use MailBee.Global.AutodetectPortAndSslMode, not Global.AutodetectPortAndSslMode. This is because Global is a keyword in VB.
See Also