EarthWeb
Developer.com
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Book
thinking in java
 
Interact
forum
guest book
jobs
jokes
what's new

share code
 
Resource
add resource
modify resource
new resource
 

[Internet Jobs]
-----
Java by E-mail:

Get the weekly e-mail highlights on Java!
-----

-

Send email without CGI


Author: Real Gagnon
Author's WebSite: http://tactika.com/realhome/realhome.html

Works with Netscape. The important thing is to NAME all the INPUT. The browser will prompt the user that an email is about to be sent.


 <FORM METHOD=POST 
       ACTION="mailto:someone@somewhere.com"
       ENCTYPE="text/plain">
 <INPUT TYPE="hidden" VALUE="1234" name="score">
 <INPUT TYPE="hidden" VALUE="Mr. Smith" name="player">
 <INPUT TYPE="submit" VALUE="Submit">
 </FORM>



To set the subject :


 ACTION="mailto:someone@somewhere.com?subject=automatic_email"



To send a Carbon Copy of the message to a second person, use the "cc" parameter :


 <FORM METHOD=POST 
       ACTION="mailto:someone@somewhere.com?subject=important&cc=someoneelse@somewhere.com"
       ENCTYPE="text/plain">
 <INPUT TYPE="submit" VALUE="Submit">
 </FORM>

While you can use a FORM to define the message body, it's also possible to define the body directly in the mailto: URL :


 mailto:someone@somewhere.com?body=HelloWorld


Posted On: 10-Jul-1999

internet.commerce