SmtpServer Constructor (String, Int32, Int32, Int32, Boolean, AuthenticationMethods, String, String, Boolean, String, ExtendedSmtpOptions, Int32, Int32, Int32) |
Initializes a new instance of the
SmtpServer class with the given
parameter values.
Namespace: MailBee.SmtpMailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public SmtpServer(
string name,
int port,
int priority,
int timeout,
bool pipelining,
AuthenticationMethods authMethods,
string accountName,
string password,
bool allowRefusedRecipients,
string helloDomain,
ExtendedSmtpOptions smtpOptions,
int maxConnectionCount,
int maxSendPerSessionCount,
int pauseInterval
)
Public Sub New (
name As String,
port As Integer,
priority As Integer,
timeout As Integer,
pipelining As Boolean,
authMethods As AuthenticationMethods,
accountName As String,
password As String,
allowRefusedRecipients As Boolean,
helloDomain As String,
smtpOptions As ExtendedSmtpOptions,
maxConnectionCount As Integer,
maxSendPerSessionCount As Integer,
pauseInterval As Integer
)
Parameters
- name
- Type: SystemString
The host name or IP address of the SMTP relay server. - port
- Type: SystemInt32
The port on which to communicate with the SMTP relay server. The standard SMTP port is 25. - priority
- Type: SystemInt32
A preference of the SMTP relay server. Lower values are preferred. - timeout
- Type: SystemInt32
The amount of time (in milliseconds) the component will wait for data to be received from the server
before returning an error, or zero to wait indefinitely. - pipelining
- Type: SystemBoolean
Specifies whether to use commands pipelining (ESMTP PIPELINING) if it's supported by the server. - authMethods
- Type: MailBeeAuthenticationMethods
A set of authentication methods which can be used when authenticating the user on the server. - accountName
- Type: SystemString
The user account name on the server. - password
- Type: SystemString
The user account password on the server. - allowRefusedRecipients
- Type: SystemBoolean
Specifies whether refused recipients should be allowed when submitting a mail message to the server. - helloDomain
- Type: SystemString
The string to be supplied as an argument of HELO/EHLO commands, or a null reference (Nothing in Visual Basic)
to let MailBee autodetect the correct value (see Hello for details). - smtpOptions
- Type: MailBee.SmtpMailExtendedSmtpOptions
A set of flags which can be used to disable certain extended SMTP capabilities. - maxConnectionCount
- Type: SystemInt32
The maximum number of simultaneous connections to this SMTP server in multi-thread sending mode, or -1 if unlimited. - maxSendPerSessionCount
- Type: SystemInt32
The maximum number of e-mail messages which can be sent within a single connection with the server, or -1 if unlimited. - pauseInterval
- Type: SystemInt32
The amount of time in milliseconds MailBee must wait prior to connecting to the server after last disconnection from this server, or zero if instant reconnecting allowed.
Exceptions Exception | Condition |
---|
MailBeeInvalidArgumentException | name is a null reference
(Nothing in Visual Basic), or any of port, timeout, maxSendPerSessionCount, maxConnectionCount, or pauseInterval parameters is an invalid value. |
See Also