Change Session ses = Session.getDefaultInstance(props, 1);
to Session ses = Session.getDefaultInstance(props, null);
also see
http://developer.java.sun.com/developer/onlineTraining/JavaMail/contents.ht
ml for more info...
> Hi Ajay,
>
> I am stuck at some thing similar to you .... In my case .. i am not able
> to get System.getProperties() working...
>
> the code of that segment goes like this ..
>
> Properties props = System.getProperties();
> Session ses = Session.getDefaultInstance(props, 1);
>
> Wehn ever I run this .. it gives a
>
> java.security.AccessControlException: access denied
> (java.util.PropertyPermission * read,write)
>
> What should I do now .. plz let me know..
>
> wishes
> Anil