javadoc
finishing email on server side
added test
javadoc