Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java Mail Help Please

 
santosh vashist
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am running a javamail servlet which accepts from,to,subject,Host from user and sends the mail..
this is run on J2EE1.3..
it takes input but gives
java.security.authenication exception access denied (java.util.properties,*read,write)
error..
but this example runs flawlessly in JWS..
what is the problem in J2EE1.3.
does we have to send authenticator object in
session.getInstance(props,Null)
have any one tried this?
please help
santosh

 
Detlev Beutner
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's hard to say w/o any coding information...
But in general: Just to test this function it may be easier to use (JavaMail 1.2):
Session mailSession = Session.getDefaultSession(props)
This way, you are alway working on the (shared) default Session without any security ascpect. If you are going productive on a server with different applications, and/or not only sending mail via smtp but also receiving (pop3/imap), you may want (or have) to add authentication and not only to use one default shared session.
Hope it helps
Detlev
(For further information on this topic look at http://java.sun.com/products/javamail/index.html, Specification, Chapter 5 - The Mail Session)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!