MailBee.NET Objects 7.1

Global.AutodetectPortAndSslMode Property

Gets or sets whether MailBee should override SSL mode and/or port to use when it detects well-known mail server hostname (like gmail.com) or port number (like 995).

public static bool AutodetectPortAndSslMode {get; set;}

Property Value

If true, MailBee will override SSL mode and/or port to use when connecting to the mail server if it detects well-known mail server hostname or port number. If false, MailBee will always use the values specified by the application. The default value is true.

Remarks

This property makes it easier for the programmer to implement the logic of connecting to mail servers which require SSL connections. Currently, when it's true, SslMode of the corresponding Pop3, Smtp or Imap object has the default value Manual and the developer calls Connect or BeginConnect method, the following checks are made:

If you want to manually specify port and SSL mode, set this property value to false. For example, this can be useful if the mail server you're connecting to runs a regular (not SSL) POP3 service on the dedicated SSL POP3 port 995 and you want to use Manual mode.
Note   SSL mode and port overriding will not occur if the application itself changes SslMode from its default value Manual.

Note that in Visual Basic you need to use the fully qualified name when accessing this property. Use MailBee.Global.AutodetectPortAndSslMode, not Global.AutodetectPortAndSslMode. This is because Global is a keyword in VB.

See Also

Global Class | MailBee Namespace