GATEWAY-3273: Added unit tests for core mail package.

- unit tests for core mail package.
- reworked poms to inherit versions from dependency-management