FakeSMTPServer

Frequently (or not) Asked Questions

Where is the documentation for this project?

For now, this faq is the majority of the documentation available. There is also a README.txt file in the root of the distribution that contains some additional info.

What is FakeSMTPServer good for?

There are a few good uses. It is great if you want to prevent messages from being sent out during testing -- instead only show them in a UI or on the java console. It is great if you want to intercept messages before forwarding them to another message. Now, it is also coming along as a unit testing framework.

What is UI mode and how do I turn it on?

UI mode gives you a multi-pane UI to look at your messages in. This should make it easier if you really want to look at the messages that are being sent out. UI-mode is on by default starting in version 0.8.1. If you want to turn it off, edit FakeSMTPServer.properties and change the output.to.ui setting to false.

How do I write a unit test using FakeSMTPServer?

Right now, this example is the best I can offer you. Perhaps documentation will become available some day.

What license does this code use?

I'm releasing this code in a dual MPL/LGPL license. I don't agree with that subclause in the LGPL that says that you need to provide source if you change the version of your software. If you need something written up to attest to this, contact me.

I'm trying to start FakeSMTPServer and I'm getting a "java.net.BindException: Permission Denied" exception.

In Unix (including Linux, BSD, Mac OS X, and other variants) ports under 1024 can only be set up by root. If you have "sudo" set up, you can run FakeSMTPServer.sh with the sudo command. If you aren't using Unix, it probably means that you already have an SMTP server installed on your machine.

What version of Java is required to run FakeSMTPServer?

Currently, I have 1.6 on my box and that's what I'm using to develop. I've tried specifically to avoid anything that would make you require 1.6. I've started to use generics now, so I think you are out of luck if you are using 1.4 or less.

What's next for FakeSMTPServer?

In order to get to version 1.0, I believe that I need to do the following:

It would probably be nice if I would: