public class SMTPServerHandler
extends java.lang.Object
| Constructor and Description |
|---|
SMTPServerHandler(org.subethamail.smtp.helper.SimpleMessageListener mailListener,
org.subethamail.smtp.AuthenticationHandlerFactory smtpAuthHandlerFactory)
Instantiates a new SMTP server handler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRunning()
Checks whether the server is running
|
void |
startServer(int port,
java.net.InetAddress bindAddress)
Starts the server on the port and address specified in parameters.
|
void |
stopServer()
Stops the server.
|
public SMTPServerHandler(org.subethamail.smtp.helper.SimpleMessageListener mailListener,
org.subethamail.smtp.AuthenticationHandlerFactory smtpAuthHandlerFactory)
mailListener - the mail listenersmtpAuthHandlerFactory - the smtp auth handler factorypublic boolean isRunning()
public void startServer(int port,
java.net.InetAddress bindAddress)
throws BindPortException,
OutOfRangePortException
port - the SMTP port to be opened.bindAddress - the address to bind to. null means bind to all.BindPortException - when the port can't be opened.OutOfRangePortException - when port is out of range.java.lang.IllegalArgumentException - when port is out of range.public void stopServer()
If the server is not started, does nothing special.