Add javamail resource and some tweaks to improve install options

Add javamail resource and some tweaks to improve install options.