• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

How do I submit my HTML form by e-mail?

I created a simple form on a webpage, where I ask for visitors to enter their e-mail address and click 'Submit' if they want to be notified of an event.
When I test the form, nothing happens, apart from the re-direct to a second webpage.

This is the code I use:

<form action="info@invoiceit.com" method=post enctype="text/plain">
<input type="hidden" name=tx1>
<input type="text" name="tx2" size="27" value="enter your e-mail address"><a href="thanksforwantingcloud.htm">
<input type=submit value="Send it" name="B1"><input type="reset" value="Reset" name="B2">
</form>

What is missing to send the content of that text box to my e-mail address?

Hope you can help - thank you.
0
CoStar
Asked:
CoStar
  • 4
  • 3
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
See the bottom example on this page:  http://msdn.microsoft.com/en-us/library/aa767737%28v=vs.85%29.aspx

For it to work in IE, you must use the exact names shown.  IE will not pass anything else to the user's email program.

The only other alternative is to use server-side scripts like ASP or PHP.
<form action="mailto:info@invoiceit.com" method="get">
<input name="subject" type="hidden" value="Message Title">

Feedback:<br/>
<textarea name=body cols="40">
Enter your e-mail address.
</textarea>

<input type="submit" value="Send it">
</form>

Open in new window

0
 
CoStarAuthor Commented:
Thank you so much. I modified the code along your example and it now reads
<form action="info@invoiceit.com" method="get">
<input name="subject" type="hidden" value="Notify Cloud release">
<textarea name=body cols="40" rows="1">e-mail address</textarea>
<a href="thanksforwantingcloud.htm">
<input type=submit value="Send it" name="B1">
<input type="reset" value="Reset" name="B2">
</form>

Open in new window


Unfortunately, no mail arrives.
I can't see where I go wrong. It seems so simple, yet so elusive.
0
 
Dave BaldwinFixer of ProblemsCommented:
You removed the 'mailto' part.  It will not work without that.  And this <a href="thanksforwantingcloud.htm"> does absolutely nothing.  Remove it.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
CoStarAuthor Commented:
yes, I omitted that and now it works. Thank you for pointing it out.
Just one little thing left:
I use value="Notify Cloud release" as the subject, but on the e-mail it appears as
Notify+Cloud+release
Do you know how the + signs can be changed to spaces?
0
 
Dave BaldwinFixer of ProblemsCommented:
They can't as far as I know.  They are required because of the way the email program is called from the web browser.
0
 
CoStarAuthor Commented:
I figured it out:
value=Notify&nbsp;cloud&nbsp;release
Thank you for all your help. Points are awarded
0
 
Dave BaldwinFixer of ProblemsCommented:
Thanks, glad to help.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now