?
Solved

POP3 error --> S: -ERR Bad login

Posted on 2003-02-28
14
Medium Priority
?
854 Views
Last Modified: 2008-02-01
I am running a simple mail program that logs into a pop3 server.  Using jre1.4 on win32 accessing a exchange server.  See code below.

Store store = mailSession.getStore("pop3");
store.connect(serverNamePOP3, username, password);
Folder inbox = store.getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
int count = inbox.getMessageCount();

get the following errors:

S: +OK POP3 server1.*****.com v2000.70rh server read
C: USER dlee
S: +OK POP3 server1.*****.com v2000.70rh server read
S: +OK User name accepted, password please
C: PASS ***** (just blanked out)
C: USER dlee
S: +OK User name accepted, password please
C: PASS ***** (just blanked out)
S: +OK POP3 server1.*****.com v2000.70rh server read
C: USER dlee
S: +OK User name accepted, password please
C: PASS ***** (just blanked out)
S: -ERR Bad login
S: -ERR Bad login
C: QUIT
C: QUIT
S: +OK Sayonara
S: +OK Sayonara
S: -ERR Bad login
C: QUIT
S: +OK Sayonara



any ideas?
0
Comment
Question by:davidslee9
  • 8
  • 6
14 Comments
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8045871
It would appear that your client is trying to connect to the server three times and gets confused as to where it is in the protocol. Does your client properly wait for the server to answer? Does your client parse the responses from the server to provide the correct next command?

Are you using a standard email package, or is it in-house?
0
 

Author Comment

by:davidslee9
ID: 8050644
Actually, the output was because I spawn 3 threads to do the same thing ... so dont worry about that ...

thanks
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8050672
Well, maybe you could post the output from running one thread only? Thanks.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:davidslee9
ID: 8053314

Verified Addresses
  dlee@*.com
DEBUG SMTP SENT: DATA
DEBUG SMTP RCVD: 354 Start mail input; end with <CRLF>.<CRLF>

DEBUG SMTP SENT:
.
DEBUG SMTP RCVD: 250 2.6.0  <16607409.1046638610544.JavaMail.dlee@boilermakers>
Queued mail for delivery

DEBUG SMTP SENT: QUIT

DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.
POP3Store,Sun Microsystems, Inc]
POP3: connecting to host "pop3.mosol.com", port 110
S: +OK POP3 server1.*.com v2000.70rh server ready
C: USER dlee
S: +OK User name accepted, password please
C: PASS *
S: -ERR Bad login
C: QUIT
S: +OK Sayonara
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8053967
Have you tried to use telnet to see if that works?

You should be able to start a telnet session to the POP3 port and communicate with the server that way.

It seems to me that either the user name or the password is incorrectly formatted and/or wrong.
0
 

Author Comment

by:davidslee9
ID: 8055038
tried using telnet same thing ..

thanks
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8055211
Have you verified that the user name and password are valid?
0
 

Author Comment

by:davidslee9
ID: 8057550
yes I have ..
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8059892
Has POP3 access been allowed for the account your trying to access?
0
 

Author Comment

by:davidslee9
ID: 8059922
yes - I am asking our IT depart right now ..
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8059960
Ok.
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8073566
Did ever find a solution?
0
 

Author Comment

by:davidslee9
ID: 8073634
not yet .. but I will post it once I hear from IT.  thanks buddy
0
 
LVL 14

Accepted Solution

by:
Tommy Braas earned 40 total points
ID: 8073666
not a problem!
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question