com.dumbster.smtp
public class SimpleSmtpServer extends Object implements Runnable
UNKNOWN: constructor allowing user to pass preinitialized ServerSocket
Field Summary | |
---|---|
static int | DEFAULT_SMTP_PORT
Default SMTP port is 25. |
Constructor Summary | |
---|---|
SimpleSmtpServer(int port)
Constructor. |
Method Summary | |
---|---|
Iterator | getReceivedEmail()
Get email received by this instance since start up. |
int | getReceivedEmailSize()
Get the number of messages received. |
boolean | isStopped()
Check if the server has been placed in a stopped state. |
void | run()
Main loop of the SMTP server. |
static SimpleSmtpServer | start()
Creates an instance of SimpleSmtpServer and starts it. |
static SimpleSmtpServer | start(int port)
Creates an instance of SimpleSmtpServer and starts it. |
void | stop()
Stops the server. |
Parameters: port port number
Returns: List of String
Returns: size of received email list
Returns: true if the server has been sent a stop signal, false otherwise
Returns: a reference to the SMTP server
Parameters: port port number the server should listen to
Returns: a reference to the SMTP server