SmtpServerCollectionAdd Method (String, String, String, AuthenticationMethods)
Adds a top (0) priority SMTP relay server under the specified host name (or IP address string) to the collection, enables ESMTP authentication for this server using the specified methods, and sorts the collection according to the elements priorities.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public SmtpServer Add(
	string serverName,
	string accountName,
	string password,
	AuthenticationMethods authMethods
)

Parameters

serverName
Type: SystemString
The host name or IP address string of the SMTP relay server to be added to the collection. The value cannot be a null reference (Nothing in Visual Basic).
accountName
Type: SystemString
The user account name on the server.
password
Type: SystemString
The user account password on the server.
authMethods
Type: MailBeeAuthenticationMethods
A set of authentication methods which can be used when authenticating the user on the server.

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).
See Also