Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavA Mail:access to default session denied

843830Apr 24 2002 — edited Nov 9 2006
Can any body help me
i am using java mail API to send mail from JSP-bean.
all my program works well , but some times I get error' Access to default session denied"
and all mails, after this error ( even from a new page) does not send.
has any one exp the same error

code used
------------------------------------------------------------------------------------------------------------------
Properties props = new Properties();
props = System.getProperties();
props.put("mail.smtp.host",smtp);
props.put("mail.smtp.auth","true");
session = javax.mail.Session.getDefaultInstance(props,null);
----------------------------------------------------------------------------------------------------
is this of "System.getProperties();" or javax.mail.Session.getDefaultInstance(props,null);

Thanks in advance
Mathew
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2006
Added on Apr 24 2002
6 comments
891 views