Skip to main content
gamedev.net
🔒 Locked

[java] Java mailto implementation

Started by AndyTang 2 replies 400+ views
Original Post
AndyTang
AndyTang
Does anyone know if Java supports a easy class or functions to do a ''mailto'' ability as in forms - basically I dont want a mail application to start up, just sends (submits) some text to a email address.
WayfarerX
WayfarerX
JavaMail
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
AndyTang
AndyTang
Is there a simpler method? Say something that uses the browsers own submit mail to implementation? This is because all I want to do is create an applet that retrieves some info from the user (encrptys it, thats why an applet and not a form) and send it via email.
HenryApe
HenryApe
You could possibly use some Java to &#106avascript integration technology to solve that problem. I have done similar things long ago with Netscape''s LiveConnect, but that may be outdated.

Another way would be to have the applet open a HTTP connection to the webserver and post the encrypted data in the same way as you would post a form to a server-side script that handles the actual mailing. In other words, you write some code that simulates the GET or POST method that the browser uses to post form data and you install some kind of formmailer script on your homepage (make sure to secure the script so it can not easily be used to send spam though). This may be the simplest solution since simulating a GET query just require that you send a few lines of text over the HTTP connection''s output stream.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.