SmtpServerCollectionAdd Method (String, Int32, Int32, Int32, Boolean, AuthenticationMethods, String, String, Boolean, String, ExtendedSmtpOptions)
Initializes a new instance of the SmtpServer class with the given parameter values, adds this instance to the collection, and sorts the collection according to the elements priorities.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public SmtpServer Add(
	string serverName,
	int serverPort,
	int priority,
	int timeout,
	bool pipelining,
	AuthenticationMethods authMethods,
	string accountName,
	string password,
	bool allowRefusedRecipients,
	string helloDomain,
	ExtendedSmtpOptions smtpOptions
)

Parameters

serverName
Type: SystemString
The host name or IP address of the SMTP relay server.
serverPort
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.

Return Value

Type: SmtpServer
A reference to SmtpServer object which was created based on the given parameter values and then added to the collection.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionserverName is a null reference (Nothing in Visual Basic) or serverPort is an invalid port number.
See Also