I am trying to use the JAVAMAIL API through an applet on an INTRANET, not internet. I have read through over 100 posts on JavaRanch and Web Sites including java.sun.com regarding trusted applets and applet security. The javamail API requires writing and reading the System.getProperties() but I can't seem to get my applet trusted enough to do so. I keep getting a securityexception on read, write. I know why, but I don't know how to fix it. Everything on JavaRanch seems to be a special case situation that only works for one person. Everything on java.sun.com is so "technical" and vague that questions are never answered. What I am wanting to know are the exact steps I need to take to allow the Applet access to the System Properties. And I need to do so without manually creating a Policy File on each Client machine because I will never know what client machine is accessing my Applet. Thanks for any help.
The applet is not local. It does reside on an INTRANET. What I found out was that although the java.sun tutorial on the JAVAMAIL API shows that you do this line
There is really no need since the JAVAMAIL API doesn't use System Properties, at least not for just sending mail. So I changed it and just created a new Properties Object:
And that works for me. I did however have to put a mail server on the Server my applet resides on. I used PostCast Server. It is free and just acts as a go between for my companies Exchange Server. Works really well.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop