I asked our university's IT staff and they said it wont be with pop3 commands. It must be with SMTP.
As in the java with open socket, i think we cant do in the jboss. So i have to do something different. On the internet, there are so many examples but nothing is similar to mine. I take the usernama and password from the login page and i have to use it for authentication.
Again thanks aldo,
In that case, a good thing to try is to use a sniffer(like Wireshark) and see how your mail client is authenticating against the server. Once you have that, the rest should be as simple as put that logic in the authenticate method.