Added tests to the SMTP mailer

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Added test and javadoc.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>