Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

emailing html form info 1

Status
Not open for further replies.

designgirl

Technical User
Jun 27, 2002
20
0
0
US
I have a form in html that is supposed to email the form responses. Problem is when submit is clicked it brings up an email with the subject but the form data is not in it. I have been told I need ASP coding to send it properly or put it in a file on the server. How would I do this? I am not familiar with ASP and haven't programmed in years.

this is the html for starting and ending
<form method=&quot;POST&quot; action=&quot;mailto:emailaddress?subject=request a quote&quot; enctype=&quot;text/plain&quot; onSubmit=&quot;&quot;>
<input type=&quot;submit&quot; value=&quot;Submit Form&quot;>
</form>

Thanks
 
you would need to select one of a few different components available for ASP. more then likely this will be based on what is available to you with your service.
her's a short list
CDONTS
ASPMail
ASPEmail
JMail
and a few more
here are some links for easy examples of using each of them
CDONTS

ASPMail

ASPEmail

JMail

---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
where would I put the asp code once I figure out which component I have and have the code ready.

 
you can place it in the form to submit to itself but the simple way would be to point the form action at a .asp page that only processes the mail and then redirects to a confirmation page or such.
although it's not really completed and is kind of choppy you can check this tutorial example out
it should answer some questions you may have.

---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
Thanks onpnt.

One last question (I hope). Where would I put the server side script or is it dependent on the server?

 
just write the script and save it as mail.asp or something then upload it to the same directory that the form page is located at
so if you have form.html and mail.asp in the same directory then your action in the form tag in the form.html page would read
<form action=&quot;maill.asp&quot;>
and then the mail.asp will be called upon submission ---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top