Click to See Complete Forum and Search --> : Trying to use a mailto script with a Form


Cell 2Dee
02-10-2006, 07:13 PM
wassup peoples, im tryna use a mailto: script with a form but im not sure how, ive been looking on the net but ive not really understood alot, heres the form ive got

Name: <input size="10" maxlength="40" name="name" type="text"> <br>
Email Address: <input size="10" maxlength="30" name="email" type="text"><br>
Your Site: <input size="10" maxlength="30" name="yoursite" type="text"><br>
<br>
Comments: <br>
<textarea rows="5" cols="72" name="Comments"></textarea><br>
<br>
<input value="Send" type="submit"> </span></td>

now i want the information people type to be sent to my email address, but the times ive added parts to the html and tried it it's just opened up the default mail handler, can anybody help? many thanks

pcthug
02-10-2006, 08:27 PM
Best Handled with a server-side scripting:
Example (http://www.apptools.com/phptools/forms/forms1.php)

Cell 2Dee
02-11-2006, 05:30 AM
ok, but basically all i want to do is edit the code in my first post so it works, i dont know alot about PHP and HTML

the tree
02-11-2006, 05:36 AM
The "mailto" action relies on your visitors mail client wich is a pretty impractical approach. You would be better off using a process that runs on your server (Server Side Scripting). Which one you use (PHP, ASP, ASP.net, CGI-Perl, JSP, ColdFusion) depends on what your host supports.

Fang
02-11-2006, 05:37 AM
The mailto: protocol will (try to) open in the default mail client. If you want it handled in a different way you will have to use server-side scripting.

robertketter
02-11-2006, 06:35 AM
This is my way of doing it. It always works just fine for me. :)

<FORM METHOD=POST ACTION="mailto:someone@$nailmail.com" ENCTYPE="text/plain">
<INPUT TYPE="text" NAME="username"> : name <BR>
<INPUT TYPE="text" NAME="email"> : email <BR>
comments <BR>
<TEXTAREA NAME="COMMENTS" ROWS="10" WRAP="hard">
</TEXTAREA>
<INPUT NAME="redirect" TYPE="hidden" VALUE="index.html">
<INPUT NAME="NEXT_URL" TYPE="hidden" VALUE="index.html">
<BR>
<INPUT TYPE="submit" VALUE="Send">
<INPUT TYPE="reset" VALUE="Clear">
</FORM>

email me if you need more.
Robert Ketter

Fang
02-11-2006, 06:58 AM
problems with mailto: (http://www.isolani.co.uk/articles/mailto.html)

robertketter
02-11-2006, 07:08 AM
Fang's got the right idea and after reading the artical "Problems With mailto:" I think I too would suggest server-side. Please email me and we can discuss a .cgi scripting option.

Robert Ketter

Fang
02-11-2006, 07:50 AM
http://www.webdevfaqs.com/php.php#mailer

ray326
02-11-2006, 10:39 AM
And if PHP isn't available then CGI/Perl may be.

http://www.bignosebird.com/carchive/bnbform.shtml