When trying to send mail via SMTP to JAMES, it was throwing a
NullPointerException whenever the content of the message was sent. This
problem was tracked down to MailHeaders.java in the isValid() function. I
commented out the first three lines in this function so it would always
return true and the server then worked fine.
When trying to receive mail, I used the classes from Sun's pop3. jar and the
program (getMail) would hang whenever it tried to get an information of the
message. However, receiving mail using MS Outlook Express works fine. The
difference between getting mail using Sun's classes and getting mail in
Outlook is that Outlook uses different pop3 commands. Below is the log
output of when I tried to get mail from my java program:
2000.06.26 03:04:57 691 (INFO) from POP3Server: Connection from 127.0.0.1
(127.0.0.1)
2000.06.26 03:04:57 701 (INFO) from POP3Server: Command recieved: USER test
2000.06.26 03:04:57 701 (INFO) from POP3Server: Command recieved: PASS test
2000.06.26 03:04:57 792 (INFO) from POP3Server: Command recieved: STAT
2000.06.26 03:05:15 938 (INFO) from POP3Server: Command recieved: TOP 1 0
2000.06.26 03:07:14 258 (ERROR) from POP3Server: Connection timeout on
socket
And below is what happens when using Outlook:
2000.06.26 03:08:10 959 (INFO) from POP3Server: Connection from 127.0.0.1
(127.0.0.1)
2000.06.26 03:08:10 969 (INFO) from POP3Server: Command recieved: USER test
2000.06.26 03:08:10 979 (INFO) from POP3Server: Command recieved: PASS test
2000.06.26 03:08:11 180 (INFO) from POP3Server: Command recieved: STAT
2000.06.26 03:08:11 220 (INFO) from POP3Server: Command recieved: LIST
2000.06.26 03:08:11 260 (INFO) from POP3Server: Command recieved: RETR 1
2000.06.26 03:08:11 350 (INFO) from POP3Server: Command recieved: RETR 2
2000.06.26 03:08:11 360 (INFO) from POP3Server: Command recieved: DELE 1
2000.06.26 03:08:11 360 (INFO) from POP3Server: Command recieved: DELE 2
2000.06.26 03:08:11 360 (INFO) from POP3Server: Command recieved: QUIT
2000.06.26 03:08:11 440 (INFO) from POP3Server: Connection closed
I'm guessing that there is something wrong with using the TOP command and
there may be a way to get around it such as writing our own pop3 handler,
and then when receiving the message we can instantiate a Message class using
a Session and InputStream.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]