My ISP does not provide CGI or java servlets to residential users and I
will not use a mailto: url in my webpages. I still need a way for folks
to email me through a contact screen on my website.
I quickly built a contact form applet using my java IDE but am clueless
about how to get the applet to SMTP mail the form data to me. It seems
that the java security manager won't allow java applets to make network
connections in untrusted mode and it is not realistic to expect folks to
add my applet to their trusted list. Is there any way that I can get an
untrusted applet to SMTP mail its data? I doubt that the generic PC
where my applet is executed will have a local SMTP server running on it.
What are workarounds, given that I can only post HTML/Javascript and
JAVA applets on my website?
KC Wong - 11 Jan 2005 10:22 GMT
> My ISP does not provide CGI or java servlets to residential users and I
> will not use a mailto: url in my webpages. I still need a way for folks
[quoted text clipped - 10 lines]
> What are workarounds, given that I can only post HTML/Javascript and
> JAVA applets on my website?
You could use your Java applet to open a mailto:url in the client browser.
But note this: Your email address will then be inside the Java applet. It
can be easily decompiled, so they'll get your email if they want to. Not
even a signed Java applet sending to your SMTP sever can help... they can
just install a packet sniffer and got all data sent.
I'd say the solution is to apply for an additional email address and install
a good spam filter in it so your mail email account can be saved from spam,
and edit the mailto url so that the subject line contains certain phrases
your filter will allow it through. Change it if someone tries to spam you
with that phrase.
Andrey Kuznetsov - 11 Jan 2005 16:59 GMT
> My ISP does not provide CGI or java servlets to residential users and I
> will not use a mailto: url in my webpages.
you can:
a) change your ISP
b) if you can't use PHP then see a)
otherwise create for example mailto.php with following content:
<?php
header("Location: mailto:your@email.com");
?>
instead of mailto:url you now use link to mailto.php

Signature
Andrey Kuznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities