Implementation of JavaMail on WebLogic

Discussions

Web tier: servlets, JSP, Web frameworks: Implementation of JavaMail on WebLogic

  1. Implementation of JavaMail on WebLogic (1 messages)

    we have implemented javamail code on tomcat, it is excuting fine. same code on weblogic is giving problem
                         with message " No provider for Address type: rfc822"

                         what's wrong in this code:

                         Properties Prop = new Properties();
                         Prop.put("mail.smtp.host", mailHost);
                         Prop.put("mail.from", from);

                         Session Ses = Session.getInstance(Prop,null);

                         Message Mess = new MimeMessage(Ses);

                         InternetAddress Addr[] = {new InternetAddress(to)};
                         Mess.setRecipients(Message.RecipientType.TO, Addr);
                         Mess.setFrom(new InternetAddress(from));
                         Mess.setSubject(subject);
                         Mess.setContent(box, "text/plain");

                         Transport Trans = Ses.getTransport(Addr[0]);

                         Trans.connect();
                         Trans.sendMessage(Mess, Addr);
  2. Give the classpath to SPI. Sun implementaion available with JavaMail API for each seperately and also in mail.jar. Set classpath to any one of it, it will work.

    senthil