1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

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

Discussion in 'Other PC Software' started by CUISTech, 2009/09/16.

  1. 2009/09/16
    CUISTech

    CUISTech Inactive Thread Starter

    Joined:
    2008/10/28
    Messages:
    419
    Likes Received:
    1
    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.

    Code:
    <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. 2009/09/16
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    You can't. You need to use a server side script or program to process the form & send the email. Who is your Web host?
     
    Last edited: 2009/09/16

  3. to hide this advert.

  4. 2009/09/16
    CUISTech

    CUISTech Inactive Thread Starter

    Joined:
    2008/10/28
    Messages:
    419
    Likes Received:
    1
    We are. This is something for our intranet when IT's out of the building.

    They fill out a form, it sends us a text message to our phone (# @ att.com, for example), and then we can VPN in.

    That's all it's supposed to do. I didn't know it would be as complicated as setting up scripts on the server...
     
  5. 2009/09/16
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    Welll, you can use a form to populate a message in the user's mail client, but to send a message directly from form to user account requires server side scripting or programs. A html form has an action=" " value, the uri of the form processor.

    One can send SMS text messages via any email client, 160 character limit. The address used is phone-number@mobile-domain.com. For At&T it's 1234567890@txt.att.net.

    The server MUST also have Internet connectivity. Is php installed on the server? Very easy to send mail using php. If the server has FrontPage Server Extensions installed & configured to recognize a mail server you can use that to send mail as well.

    You can populate the user's mail client message with form data and the user must click the send button in the message window:
    Code:
    <!DOCTYPE HTML PUBLIC  "-//W3C//DTD HTML 4.0 Transitional//EN ">
    <html>
    <head>
    <title>mailto Example</title>
    </head>
    <body>
    <form action= "mailto:you@yourdmainhere.com" method= "post" enctype= "text/plain ">
    FirstName:<input type= "text" name= "FirstName "><br>
    Email:<input type= "text" name= "Email ">
    <input type= "submit" name= "submit" value= "Submit ">
    </form>
    </body>
    </html>
    
    You could even use text inputs or selects w/ javascript to populate the action values.
     
    Last edited: 2009/09/16

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.