SmtpServer Constructor (String, Int32, Int32, Int32, Boolean, AuthenticationMethods, String, String, Boolean, String, ExtendedSmtpOptions) |
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
)
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
)
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.
Exceptions Exception | Condition |
---|
MailBeeInvalidArgumentException | name is a null reference
(Nothing in Visual Basic) or port is an invalid port number or timeout is negative. |
See Also