Integrated java security into the email handler