Skip to content

Instantly share code, notes, and snippets.

@chids
Created February 15, 2011 11:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chids/827427 to your computer and use it in GitHub Desktop.
Save chids/827427 to your computer and use it in GitHub Desktop.
SubEthaSMTP usage outline
final SMTPServer server = new SMTPServer(new SimpleMessageListenerAdapter(new SimpleMessageListener()
{
@Override
public void deliver(final String from, final String recipient, final InputStream data) throws TooMuchDataException, IOException
{
System.err.println(from + " -> " + recipient);
}
@Override
public boolean accept(final String from, final String recipient)
{
return true;
}
}));
server.setPort(9090);
server.start();
@anderssonjohan
Copy link

Nice and simple. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment