Fixes for postgresql inserts, make javax.mail provided for webapp