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.

Photo

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


  • Please log in to reply
4 replies to this topic

#1 DnDer

DnDer

  • Members
  • 646 posts
  • OFFLINE
  •  
  • Local time:09:15 AM

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>


BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:15 AM

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.

#3 DnDer

DnDer
  • Topic Starter

  • Members
  • 646 posts
  • OFFLINE
  •  
  • Local time:09:15 AM

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 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:02:15 PM

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 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,250 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:07:15 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users