MailBee.NET Objects 3.1

Smtp.DirectSendDefaults Property

Provides access to the default SMTP server settings to be used when connecting to SMTP servers discovered by MailBee via DNS MX lookup.

public DirectSendServerConfig DirectSendDefaults {get;}

Property Value

The DirectSendServerConfig object containing the default SMTP server settings to be used when connecting to SMTP servers discovered via DNS MX lookup (in direct send mode).

Remarks

This property allows the developer to specify SMTP settings for SMTP servers which are discovered by MailBee via DNS MX lookup in direct send mode (they are also called SMTP MX servers, as opposed to SMTP relay servers which reside in SmtpServers collection).

Example

The statement below demonstrates now to increase SMTP connection timeout value. This is useful if some SMTP MX servers discovered during DNS MX lookup are so slow that they do not always respond during the default timeout interval (20 seconds). In this code, the timeout value is set to 60 seconds. It's assumed mailer is an instance of Smtp class.

[C#]
mailer.DirectSendDefaults.Timeout = 60000;
[Visual Basic]
mailer.DirectSendDefaults.Timeout = 60000

See Also

Smtp Class | MailBee.SmtpMail Namespace