updated Mail.java and framework