1 Reply Latest reply on Sep 7, 2003 6:38 PM by 807581

    JavaMail broken in Platform Edition ?


      I'm trying to send an email from a Servlet. I've defined a mail Session in JNDI and I can get an instance of javax.mail.Session in my code without any problem.
      However, when I use Transport.send() I get the following exception :
           at javax.activation.MailcapCommandMap.loadFile(MailcapCommandMap.java:188)
           at javax.activation.MailcapCommandMap.(MailcapCommandMap.java:139)
           at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:55)
           at javax.activation.DataHandler.getCommandMap(DataHandler.java:146)
           at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:578)
           at javax.activation.DataHandler.getContent(DataHandler.java:511)
           at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1020)
           at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1841)
           at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822)
           at javax.mail.Transport.send(Transport.java:80)

      The only way to make it works is to overwrite mail.jar and activation.jar from imq/lib and share/lib. I also need to add mailapi.jar and smtp.jar to the server1 ClassPath. Why ?

      I've noticied the same problem by copy/paste SunOne7 mail.jar and activation.jar under Tomcat 4. My sendmail code works nice under others Application Servers and Servlet engines.
      Under my WEB-INF/lib : log4j-1.2.8.jar, classes12.jar, struts.jar

      Any help would be aprecied.