C# Class SmtpServer.OptionsBuilder

Show file Open project: cosullivan/SmtpServer Class Usage Examples

Public Methods

Method Description
AllowUnsecureAuthentication ( bool value = true ) : OptionsBuilder

Sets a value indicating whether authentication should be allowed on an unsecure session.

Build ( ) : ISmtpServerOptions

Builds the options that have been set and returns the built instance.

Certificate ( X509Certificate serverCertificate ) : OptionsBuilder

Sets the X509 certificate to use when starting a TLS session.

Endpoint ( IPEndPoint endpoint ) : OptionsBuilder

Adds an endpoint to listen on.

MailboxFilter ( IMailboxFilterFactory mailboxFilterFactory ) : OptionsBuilder

Adds a mailbox filter factory.

MaxMessageSize ( int maxMessageSize ) : OptionsBuilder

Sets the maximum message size.

MessageStore ( IMessageStoreFactory messageStoreFactory ) : OptionsBuilder

Adds a message store factory.

Port ( ) : OptionsBuilder

Adds an endpoint with the given port.

ServerName ( string serverName ) : OptionsBuilder

Sets the server name.

UserAuthenticator ( IUserAuthenticator userAuthenticator ) : OptionsBuilder

Sets the User Authenticator.

Method Details

AllowUnsecureAuthentication() public method

Sets a value indicating whether authentication should be allowed on an unsecure session.
public AllowUnsecureAuthentication ( bool value = true ) : OptionsBuilder
value bool true if the AUTH command is available on an unsecure session, false if not.
return OptionsBuilder

Build() public method

Builds the options that have been set and returns the built instance.
public Build ( ) : ISmtpServerOptions
return ISmtpServerOptions

Certificate() public method

Sets the X509 certificate to use when starting a TLS session.
public Certificate ( X509Certificate serverCertificate ) : OptionsBuilder
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate The server's certificate to use when starting a TLS session.
return OptionsBuilder

Endpoint() public method

Adds an endpoint to listen on.
public Endpoint ( IPEndPoint endpoint ) : OptionsBuilder
endpoint System.Net.IPEndPoint The endpoint to listen on.
return OptionsBuilder

MailboxFilter() public method

Adds a mailbox filter factory.
public MailboxFilter ( IMailboxFilterFactory mailboxFilterFactory ) : OptionsBuilder
mailboxFilterFactory IMailboxFilterFactory The mailbox filter factory to add.
return OptionsBuilder

MaxMessageSize() public method

Sets the maximum message size.
public MaxMessageSize ( int maxMessageSize ) : OptionsBuilder
maxMessageSize int The maximum message size to allow.
return OptionsBuilder

MessageStore() public method

Adds a message store factory.
public MessageStore ( IMessageStoreFactory messageStoreFactory ) : OptionsBuilder
messageStoreFactory IMessageStoreFactory The message store factory to use.
return OptionsBuilder

Port() public method

Adds an endpoint with the given port.
public Port ( ) : OptionsBuilder
return OptionsBuilder

ServerName() public method

Sets the server name.
public ServerName ( string serverName ) : OptionsBuilder
serverName string The name of the server.
return OptionsBuilder

UserAuthenticator() public method

Sets the User Authenticator.
public UserAuthenticator ( IUserAuthenticator userAuthenticator ) : OptionsBuilder
userAuthenticator IUserAuthenticator The user authenticator.
return OptionsBuilder