added java mailer functionality