File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes JavaMail EOf on socket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail EOf on socket" Watch "JavaMail EOf on socket" New topic

JavaMail EOf on socket

Dan Schmitt

Joined: Jul 08, 2009
Posts: 3

I'm writing an email program using JavaMail, and when I try to connect to my Gmail account I get the error AuthenticationFailedException: EOF on Socket. Here is my code:

I have a different class that just passes in my username, password, etc. I am absolutely sure my username and password are correct.

Thanks in advance

PS sendError is an abstract method inherited by the class connecting, and has no relevance to my problem
Rob Spoor

Joined: Oct 27, 2005
Posts: 19545

Can you please show us the stack trace?

How To Ask Questions How To Answer Questions
Dan Schmitt

Joined: Jul 08, 2009
Posts: 3
Oops, sorry, my program didn't print the stack trace, but I got it, and here it is:

TestDriver is the class I'm using now to test out the client class and get it working.
Dan Schmitt

Joined: Jul 08, 2009
Posts: 3
I fixed my problem. I was using pop3 as the protocol where for Gmail it is pop3s.
I agree. Here's the link:
subject: JavaMail EOf on socket
Similar Threads
Java mail attachmetnt include txt extensions
javamail : Could not connect to SMTP host
can not connect -imeout
Problem with Retriving mails from INBOX
Need some help me java mail-smtp