Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Dreamweaver MX Submit To E-mail Button

Hello all,

     I'm working on a site and am having an issue witht a Submit Button.  Basically the setup is that I have a text box and I want users to type in their e-mail address and then click the submit button.  I want that address to be seant to me via e-mail.  Now I know my host accepts cgi and perl but i'm clueless to that so i was setting it up where when they hit the submit button it would pop up Outlook with my e-mail address already in the TO field.  This works to a point but in the body it would put this:
Submit=Submit&textfield=test%40petv.com.  

Here is the html that I have:
<form name="form1" action="mailto:service@mydomain.com" method="post" >
 <input type="submit" name="Submit" value="Submit">
 <input type="reset" name="reset" value="Reset">
 <input type="text" name="textfield">

First Question is.  How do i get the body to be clear or at least have their e-mail address they typed in?  Second, how easy is it to setup using CGI where the e-mail is just sent to me without opeining their Mail Client?  Thanks for any help
0
epvc
Asked:
epvc
  • 7
  • 7
1 Solution
 
vickerleungCommented:
epvc

Usually, we will simply use a hyperlink to send a email using Outlook

Say
<a href="mailto:service@mydomain.com">Contact Us</a>


If really want to send a email, as you say, have to use CGI, something like that
Please check the following tutorial, see if it suits you
http://www.mv.com/webtools/forms-info/form-submit-ex-em.html

Vicker
0
 
epvcAuthor Commented:
Is there a way from my HTML i am using to get the info they have typed into the form automatically put in the Body of the e-mail?
0
 
vickerleungCommented:
epvc,

This line is copied from the link I posted above

    <p>
    Your comments?<br>
    <textarea name="comments" COLS=60 ROWS=8></textarea><br>

This is the part where the HTML pass the text to the email's body section

Vicker
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
epvcAuthor Commented:
Ok I have that part...however when i test it I do have a text box which is great but when I click the SUBMIT Button the e-mail generates an e-mail and puts the right e-mail address which is great.  the problem is with the text in the text box.  It's not put in the body and this is what's put instead.

Submit=Submit&comments=test+message&textfield=  

What i entered in the text box is "Test Message"

How do i get rid of the stuff around it from coming up in the body?

0
 
vickerleungCommented:
epvc,

can you use POST method instead of GET method?

Vicker
0
 
epvcAuthor Commented:
What's the difference between the two methods?
0
 
vickerleungCommented:
epvc,

GET

the parameters will pass to the next page through URL
i.e. &comments=test+message&textfield=

POST

the parameters will pass to the next page through the HTTP header

Vicker
0
 
epvcAuthor Commented:
So as my current code is what should i change?

 <tr>
 <td width="185" height="46" valign="top">
 <form name="form1" action="mailto:service@activenettech.com" method="post" >
 <input type="submit" name="Submit" value="Submit">
 <input type="reset" name="reset" value="Reset">
 <input type="text" name="textfield">
 </form></td>
0
 
vickerleungCommented:
epvc

Wait a minute

Do you mean that when you place something into the comment field and submit

You received a email with a body as follow?
Submit=Submit&comments=test+message&textfield=

Vicker
0
 
epvcAuthor Commented:
Yeah...so I have this text box with a submit button.

As a user i typed test message in the text box.  Then clicked the submit button.

I received the e-mail but in the body it has Submit=Submit&comments=test+message&textfield=.  I don't want that to be in the body when a user on the site clicks submit.
0
 
vickerleungCommented:
epvc,

Okay let we try to modify to the following

 <tr>
 <td width="185" height="46" valign="top">
 <form name="form1" action="mailto:service@activenettech.com" method="post" >
 <input type="submit" value="Submit">
 <input type="reset" value="Reset">
 <input type="text" >
 </form></td>
0
 
epvcAuthor Commented:
Ok that gets rid of the Submit=Submit&comments=test+message&textfield= and give me a blank body.  Is there any easy way to get the data they put in the text box to automatically be used in the body of the e-mail?  This is better though...i'd rather it be blank then have the other stuff.
0
 
vickerleungCommented:
epvc,

I need to check your cgi mail function before answering you this

Vicker
0
 
epvcAuthor Commented:
Ok....not sure how to do that.  Thanks though i think this will work for now.  
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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