Hi
I’m trying to write a program that checks my e-mailbox using POP3. When I open cmd and type the following:
telnet server 110
USER username
PASS password
etc.
it works. When I use my program to do the above it gets up to the telnet server 110 and I receive an +OK message, nothing happens after the USER username. I don’t receive an +OK or +ERR message. Even if I replace the USER with something that isn’t supposed to work, I still don’t receive an error message.
My code:
Socket s = new Socket(mailServer, portNumber);
inputS = new BufferedReader(new InputStreamReader(s.getInputStream()));
outputS = new PrintWriter(new OutputStreamWriter(s.getOutputStream()),true);
String response = inputS.readLine();
System.out.println(response);
outputS.println("USER " + name);
outputS.println("PASS " + password);
outputS.println("QUIT");
s.close();
Where am I going wrong?