update the read email java code