simplified the code
smarter way to convert from Properties to Map
added javax.mail/mail temporary dependency