Java Mail error
I am getting the following error message.
javax.naming.NameNotFoundException: No object bound to name java:comp/env/mail/Notification
I set up a java mail Session resouce with a JNDI name mail/Notification.
In my code I am getting the Session using:
Context ic = new InitialContext();
mailSession = (Session)ic.lookup("java:comp/env/mail/Notification");
I have also tried to just use mail/Notification but then it gives the error com.sun.enterprise.deployment.MailConfiguration cannot be cast to Session.
Can anyone assist. I can't see where I am going wrong.

