Turn your Mobile Apps into m-commerce apps – Learn More!

You're Browsing As A Guest! Register Now...
Become a ASP.NET Expert!

Join 414,937 ASP.NET Programmers for FREE! Get instant access to thousands of ASP.NET experts, tutorials, code snippets, and more! There are 2,673 people online right now.Registration is fast and FREE... Join Now!



Formmail.asp Easy enough? Rate Topic: -----

#1 GorillaCheif  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 1
  • View blog
  • Posts: 65
  • Joined: 23-April 06


Dream Kudos: 0

Share |

Formmail.asp

Posted 04 January 2008 - 01:43 PM

I don't friggin get it.
It's as if I have a blank form. formmail.asp is in place, and as far as I can tell is configured correctly.
So in testing, when you hit "send" it acts as if it's just a dead form and does nothing. Near as I can tell, something is wrong with the form...maybe?
Dang this is frustrating.
Any ideas what could be wrong?

the form code
	 <form  method="get" action="formmail.asp">
	   	<input type="hidden" name="recipient" value="blah blah@blah.com">
		<input type="hidden" name="redirect" value="http://www.blah.com/cp/thanks.html">
		<input type="hidden" name="subject" value="Document submission">

	   <p><span class="style3">name:</span><br/>
		  <input name="name" type="text" size="30" maxlength="50">
		  <br/>
		 <span class="style3">company:</span><br/>
		  <input name="company" type="text" size="30" maxlength="50">
		  <br/>
		 <span class="style3">email address:</span><br/>
		  <input name="email" type="text" size="30" maxlength="50">
		  <br/>
		 <span class="style3">quantity:</span>  <br/>
		  <input name="quantity" type="text" size="8" maxlength="10">
		  <input type="hidden" name="required" value="name,company,email,phone,quantity">
	 
  <input name="bw" type="radio" value="Black and White">
  <span class="style3">Black/White</span>  
  <input name="color" type="radio" value="Color">
  <span class="style3">Color</span>	 <br/>  
	   
		 <span class="style3">paper</span><br/>
		 <select name="paper" id="paper">
		   <option>20lb bond</option>
		   <option>80lb Index</option>
		   <option>20lb gloss</option>
		   <option>80lb cover</option>
		   <option>24lb Skytone</option>
		   <option>24lb Astro-Brite</option>
		   <option>20lb color</option>
		 </select>
		</label>	   
		<br/><span class="style3">Astrobrite</span><br/>
		<img src="images/Astrobrite/Cosmic Orange.jpg" alt="Cosmic Orange" width="37" height="37">
		<img src="images/Astrobrite/Sunburst yellow.jpg" alt="Sunburst Yellow" width="37" height="37">
		<img src="images/Astrobrite/Terra Green.jpg" alt="Terra Green" width="37" height="37">
		<img src="images/Astrobrite/Gemini Green.jpg" alt="Gemini Green" width="37" height="37">
		<img src="images/Astrobrite/Lunar Blue.jpg" alt="Lunar Blue" width="37" height="37">
		<img src="images/Astrobrite/Planetary Purple.jpg" alt="Planetary Purple" width="37" height="37">
		<img src="images/Astrobrite/Fireball Fushia.jpg" alt="Fireball Fushia" width="37" height="37">
		<img src="images/Astrobrite/Pulsar Pink.jpg" alt="Pulsar Pink" width="37" height="37">
		 
		 <br/>
		 <span class="style3">Skytone</span><br/>
		 <img src="images/Astrobrite/Natural.jpg" alt="Natural" width="37" height="37">
		 <img src="images/Astrobrite/Sagebrush.jpg" alt="SageBrush" width="37" height="37">
		 <img src="images/Astrobrite/Champagne.jpg" alt="Sunburst Yellow" width="37" height="37">
		 <img src="images/Astrobrite/Bluestone.jpg" alt="Bluestone" width="37" height="37">
		 <img src="images/Astrobrite/White.jpg" alt="White" width="37" height="37">
		 <br/><span class="style3">Special Instructions</span><br/>
		 <textarea name="SI" cols="50" rows="4" wrap="virtual" row="10">Designate color or other special instructions here</textarea>
		 <br/>
		 <span class="style3">Select file</span><br/>
		 <input name="Get file" type="file" class="style3" id="get_file" title="Get File" size="30">
		 <input name="submit" type="button" title="submit" dir="email" value="Send">
	   </form>

Was This Post Helpful? 1
  • +
  • -


#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • Icon

Reputation: 1434
  • View blog
  • Posts: 8,313
  • Joined: 18-April 07


Dream Kudos: 0

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Re: Formmail.asp

Posted 04 January 2008 - 02:37 PM

I want you to look at this line...

<input name="submit" type="button" title="submit" dir="email" value="Send">



Notice how you specify a type of "button". This means that it is a button that does nothing and is used for triggering some javascript. If you want it to be a submit button, it needs to be of type "submit".

<input name="submit" type="submit" title="submit" dir="email" value="Send">



After making this change it will then "come alive" and send the content of the form to the destination (in this case formmail.asp) via the "get" method.

If you are going to submit sensitive data or something that it is a bit easier to handle and more secure, I recommend you think about sending via "POST". It will keep the data out of the pages URL and thus not tempt users to fiddle with it. But that is up to you.

Fix the button and that should get you on the right track.

"At DIC we be formmail.asp ass kicking code ninjas!" :snap:
Was This Post Helpful? 0
  • +
  • -

#3 GorillaCheif  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 1
  • View blog
  • Posts: 65
  • Joined: 23-April 06


Dream Kudos: 0

Re: Formmail.asp

Posted 04 January 2008 - 03:00 PM

View PostMartyr2, on 4 Jan, 2008 - 04:37 PM, said:

After making this change it will then "come alive" and send the content of the form to the destination (in this case formmail.asp) via the "get" method.

If you are going to submit sensitive data or something that it is a bit easier to handle and more secure, I recommend you think about sending via "POST". It will keep the data out of the pages URL and thus not tempt users to fiddle with it. But that is up to you.

Fix the button and that should get you on the right track.

"At DIC we be formmail.asp ass kicking code ninjas!" :snap:



Thank you so much. I completely overlooked that.
However, when you do submit the form, it pulls the formmail.asp up in the browser window.
I originally had it as method="post", but was running into the same problem.
Hope that makes sense.

Sorry, I'm pretty new to this stuff.
Was This Post Helpful? 0
  • +
  • -

#4 Martyr2  Icon User is offline

  • Programming Theoretician
  • Icon

Reputation: 1434
  • View blog
  • Posts: 8,313
  • Joined: 18-April 07


Dream Kudos: 0

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Re: Formmail.asp

Posted 04 January 2008 - 04:30 PM

Yup that is what happens when you submit your form, it sends the data to wherever you set in the "action" parameter. What formmail.asp is suppose to do is then process the form and redirect to another page. It doesn't necessarily mean that it failed or anything. See if the formmail.asp actually sent an email (change the blah blah email to your email and see if the formmail sends you an email containing the forms data).

:)
Was This Post Helpful? 0
  • +
  • -

#5 GorillaCheif  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 1
  • View blog
  • Posts: 65
  • Joined: 23-April 06


Dream Kudos: 0

Re: Formmail.asp

Posted 07 January 2008 - 08:23 AM

View PostMartyr2, on 4 Jan, 2008 - 06:30 PM, said:

See if the formmail.asp actually sent an email (change the blah blah email to your email and see if the formmail sends you an email containing the forms data).

:)


That's just it, nada, zip, zero, nuffin.
No email, no redirect.

This post has been edited by GorillaCheif: 07 January 2008 - 08:46 AM

Was This Post Helpful? 0
  • +
  • -

#6 Martyr2  Icon User is offline

  • Programming Theoretician
  • Icon

Reputation: 1434
  • View blog
  • Posts: 8,313
  • Joined: 18-April 07


Dream Kudos: 0

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Re: Formmail.asp

Posted 07 January 2008 - 10:03 AM

If you would like, you can zip up your form page, formmail.asp and I can try it out on servers I have access to and I know are configured properly. I can then find the error if there is one.

Zip the necessary files and attach to this thread.

Thanks! :)
Was This Post Helpful? 0
  • +
  • -

#7 GorillaCheif  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 1
  • View blog
  • Posts: 65
  • Joined: 23-April 06


Dream Kudos: 0

Re: Formmail.asp

Posted 08 January 2008 - 02:16 PM

View PostMartyr2, on 7 Jan, 2008 - 12:03 PM, said:

If you would like, you can zip up your form page, formmail.asp and I can try it out on servers I have access to and I know are configured properly. I can then find the error if there is one.

Zip the necessary files and attach to this thread.

Thanks! :)



I've tried similar forms with PHP, CGI and now ASP.
None have worked so far. Which leads me to the conclusions that either, our server isn't compliant with any or this is all very over my head.
Thanks for your help.

Attached File(s)


Was This Post Helpful? 0
  • +
  • -

#8 Martyr2  Icon User is offline

  • Programming Theoretician
  • Icon

Reputation: 1434
  • View blog
  • Posts: 8,313
  • Joined: 18-April 07


Dream Kudos: 0

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Re: Formmail.asp

Posted 08 January 2008 - 03:45 PM

This script really has some issues. It has a bunch of garbage in it commented out, the formatting turned out horrible, not to mention it goes through a dozen things that you don't have to do in asp. Below I have rewritten the test form to send out an email using a default installed cdonts class.

All you have to do is unzip it, replace where it says "your_email_here" with your email address, upload it to your site, nagivate to it, fill out the form and hit send. Then check your email for the response. If this all works, then you know you are setup and that your site is configured correctly to use cdonts. Formmail.asp uses cdonts too, but like I said it is really weird requiring you to contact smtp directly etc.

If this new form works for you, take a look at the code I put into the form and see how it works. You can then modify it pretty easy to make whatever forms you like.

Hope this helps. :)

Attached File(s)


Was This Post Helpful? 1

#9 GorillaCheif  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 1
  • View blog
  • Posts: 65
  • Joined: 23-April 06


Dream Kudos: 0

Re: Formmail.asp

Posted 10 January 2008 - 04:15 PM

Ok, I'm still getting the same issue, with nothing in my inbox.
And here's the reason why. My host server doesn't support ASP.
DUH GC! I don't know why I assumed it did.
Man, I really appreciate all your help. Is there a way to do this with CGI or PHP?
I have a form mail PHP on here too that has a dozen issues with it too.

What do you know about PHP? LOL j/k.

thanks again.

This post has been edited by GorillaCheif: 10 January 2008 - 04:19 PM

Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users