• Post Reply Bookmark Topic Watch Topic
  • New Topic

do u require a user authentication when sending mails using javax.mail api  RSS feed

 
mihir maniar
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do u require a user authentication when sending mails using javax.mail api
or simply the server name and the other required details of to,from.........plz help me out.
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!