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

not getting session

 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to send email using java mail. But I am not getting the mail session. I haven't got any errors in my log or any exceptions!

Here is my code :


Context ctx = new InitialContext();
String mailFactory = "java:comp/env/mail/MailSession";
if (InvoiceConfig.getEmailSessionName() != null) {
mailFactory = "java:comp/env/"+ InvoiceConfig.getEmailSessionName();
}
Logger.getLog().debug(" mailFactory :"+mailFactory);
mailSession = (Session) ctx.lookup(mailFactory);
Logger.getLog().debug(" mailSession :"+mailSession);



I have given the session name as mail/MailSession itself. Using smtp to send mails. So I have given it in tomcat_5.5.17 server.config file.
Could anyone help me to find out where is going wrong ? Please help me.

Thanks,
Joe.
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me. Anyone have any idea about my problem ?

Thanks,
Joe.
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not answered within 3 hours. That's pretty lame.
Maybe if you put "URGENT NEED HELP" in the topic title everyone will stop working on their daytime jobs (who needs money anyway) and start working to solve your problem.

If you do not get it out of the Context then:
- It's either not in there
- It's in there but under a different name
- It's in there but in another Context



Pascal
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pascal betz:
not answered within 3 hours. That's pretty lame.
Maybe if you put "URGENT NEED HELP" in the topic title everyone will stop working on their daytime jobs (who needs money anyway) and start working to solve your problem.

If you do not get it out of the Context then:
- It's either not in there
- It's in there but under a different name
- It's in there but in another Context



Pascal


Thanks for your comments !!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!