posted 20 years ago
I believe that it depends on how the mail server is set up, and has nothing to do with the JavaMail API itself. I've never had to authenticate (using user/password) to the mail server, but I'm sitting behind a corporate firewall and the server "trusts" any internal traffic.
The only time I've had to authenticate is when I used JavaMail to retrieve mail from a particular mailbox.
I'd say try and send a message w/out a user and password: if it succeeds you know you don't need it, and if it fails check the error message (you might want to turn debug on so you can see the details of the session).