Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-12-28
7
Medium Priority
?
215 Views
Last Modified: 2012-12-28
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
Comment
Question by:CoStar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 38728616
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
 

Author Comment

by:CoStar
ID: 38728667
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
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38728680
You removed the 'mailto' part.  It will not work without that.  And this <a href="thanksforwantingcloud.htm"> does absolutely nothing.  Remove it.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:CoStar
ID: 38728706
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
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38728715
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
 

Author Comment

by:CoStar
ID: 38728716
I figured it out:
value=Notify&nbsp;cloud&nbsp;release
Thank you for all your help. Points are awarded
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38728719
Thanks, glad to help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question