Wrox Home  
Search P2P Archive for: Go

  Return to Index  

servlets thread: RE :Re :JavaMail API


Message #1 by "Jagmohan Singh" <jsnegi@s...> on Mon, 30 Apr 2001 07:33:41 +0530
Dear hamid ,
                    i have done it. it was nothing but the classpath setting
in the autoexec.bat file.sorry for late mailing u as i was out of station
for sometime.
set the classpath to activation.jar & mail.jar and then try this program
from wrox:

  import javax.mail.*;

public class Mymail{
 public static void main(String A[])
   {
  java.util.Properties prop=System.getProperties();
  Session s=Session.getInstance(prop,null);
  try{
  Provider[] p=s.getProviders();
     for(int i=0;i<p.length;++i)
   {
    System.out.println(p[i]);
   }
  }catch(Exception e)
   {
  System.out.println("Array Index out of Bound");
   }
 }
}

please mail me to confirm at

jsnegi@s...




  Return to Index