BleepingComputer.com: Creating a button that sends an e-mail of a form

Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Creating a button that sends an e-mail of a form

#1 User is offline   DnDer 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 552
  • Joined: 25-October 08

Posted 16 September 2009 - 11:02 AM

I have a web page that users can fill out. I want them to click the "send" button, and get an e-mail in my box when they send it. My code currently opens their e-mail program, and gives them a blank e-mail to send. How do I make a button that sends an e-mail with the information the user filled out without opening their e-mail?

I started with a Front Page '03 template, and have been trying various solutions I've been able to google... But nothing is behaving quite like I need it to.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>IT Support Issue</title>
</head>

<body>

<p>
<!--webbot bot="PurpleText" preview="Feedback Form - Customize the form below to collect the information you need. By default, the form data is saved to a text file on the web server using the FrontPage Save Results component. Edit the Form Properties to change this behavior." -->
</p>
<form method="POST" action="--WEBBOT-SELF--">
	<!--webbot bot="SaveResults" u-file="C:\Documents and Settings\etaylor\Desktop\_private\feedback.txt" s-format="TEXT/TSV" s-label-fields="TRUE" s-builtin-fields="Date Time REMOTE_NAME REMOTE_USER HTTP_USER_AGENT" s-form-fields -->
	<p><strong>Send a text to IT staff for after-hours support.</strong></p>
	<p><strong>IT Support Issue:</strong></p>
	<dl>
		<dd><textarea name="Comments" rows="5" cols="42"></textarea></dd>
	</dl>
	<p><strong>Contact Information:</strong></p>
	<dl>
		<dd>
		<table>
			<tr>
				<td>Name</td>
				<td>
				<input type="text" size="35" maxlength="50" name="Username"></td>
			</tr>
			<tr>
				<td>Extension</td>
				<td>
				<input type="text" size="35" maxlength="50" name="UserEmail"></td>
			</tr>
			<tr>
				<td>Console Number</td>
				<td><input type="text" size="35" maxlength="50" name="UserTel"></td>
			</tr>
			<tr>
				<td>IP Address</td>
				<td><input type="text" size="35" maxlength="50" name="UserFAX"></td>
			</tr>
		</table>
		</dd>
	</dl>
	<p><input type="button" value="Send Text" onClick="location.href='mailto:myemail@sampledomain.com'">
	<input type="reset" value="Clear Form"></p>
</form>

</body>

</html>


#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 16 September 2009 - 11:59 AM

In order to do what you want, you need something on the server to get the form information, turn it into a message, and send it. PHP works pretty good for this, as does Java, ASP, PERL, etc. etc.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#3 User is offline   DnDer 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 552
  • Joined: 25-October 08

Posted 16 September 2009 - 12:17 PM

I won't ask you to teach me, but you think you can point me to a tutorial or two?

#4 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

Posted 27 September 2009 - 04:28 PM

Here is a good site, you may have used it before.
http://www.w3schools.com/PHP/php_mail.asp
It is a php script that gets the text entered in your box and sends it to the specified e-mail, for more help on php just surf w3c schools and if you need another tutorial on sending mail with php just google php mail tutorial.

I hope this helps, Wolfy87.

#5 User is offline   Andrew 

  • Bleepin' Night Watchman
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 7,329
  • Joined: 05-December 05
  • Gender:Not Telling
  • Location:Right behind you

Posted 02 October 2009 - 07:29 PM

You can use the free form handler at http://www.tipjar.com/generic.html . It's pretty easy to set up. If you want to go with a solution that you host yourself, I like FormMail from Tectite.
Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.
Posted Image
Boredom Software Stop Highlighting Things

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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