Support Center » Knowledgebase » Send Email From Forms (FTP Sites)
 Send Email From Forms (FTP Sites)
Solution

How To - Send Email From Forms

You've just finished your new website form and are trying to get it to send. Perhaps you've used Microsoft Front Page to create it. Unfortunately at Freestart we do not support the required Front Page extensions that are needed to send the email due to the security implications of enabling them. You have two options for sending an email;

1) Use Freestart's mail script

At Freestart we understand that not everyone understands how to use the programming languages mentioned above. We have simplified the process needed to send an email from any form you have created. How to use this script is outlined below;

If you look at the HTML for the form you have just created you will see something similar to the following line of code:

<form name="form" action="action" method="post">
...

Don't worry if its slightly different. The first thing we need to do is change it to this:

<form name="form" action="http://www.freestart.plc.uk/cgi-bin/formmail.php" method="post">
...

Then we need to add some hidden fields to the form so we know who to send the email to and what to do once it has been sent. Don't worry though these fields will not show up on your form or be visible to the user. Lets first see how to set the "emailto" field, this is who will receive the email (note its position within the form tag we just added/modified):

<form name="form" action="http://www.freestart.plc.uk/cgi-bin/formmail.php" method="post">
<input type="hidden" name="emailto" id="emailto" value="your@email.address.com" >
...

We will now add to this the "subject" field. This will become the subject of the email that is displayed in your email client:

<form name="form" action="http://www.freestart.plc.uk/cgi-bin/formmail.php" method="post">
<input type="hidden" name="emailto" id="emailto" value="your@email.address.com" >
<input type="hidden" name="subject" id="subject" value="Website Enquiry" >
...

Next we'll add the "website" field. This field is used if no subject is specified and should just be your domain name:

<form name="form" action="http://www.freestart.plc.uk/cgi-bin/formmail.php" method="post">
<input type="hidden" name="emailto" id="emailto" value="your@email.address.com" >
<input type="hidden" name="subject" id="subject" value="Website Enquiry" >
<input type="hidden" name="website" id="website" value="www.freestart.com" >
...

Finally we need to add the "redirect" field. This is the website address of the page you wish users to be redirected to after the form has been sent. You will need to create this page. Please note the inclusion of 'http://'.

<form name="form" action="http://www.freestart.plc.uk/cgi-bin/formmail.php" method="post">
<input type="hidden" name="emailto" id="emailto" value="your@email.address.com" >
<input type="hidden" name="subject" id="subject" value="Website Enquiry" >
<input type="hidden" name="website" id="website" value="www.yourwebsiteaddress.com" >
<input type="hidden" name="redirect" id="redirect" value="http://www.yourwebsiteaddress.com/thank_you.htm" >
...

That should be all the modifications that need to be made. Please ensure that the fields (text boxes etc.) within your form are suitable named i.e.:

...
<input type="text" name="telephone_number" id="telephone_number" >
<textarea name="comments" id="comments"><textarea>
....

All you need to do now is save the changes you have made to your form and submit it. It should now be sent to the email address you specified.

2) Create a script in ASP/PHP

This option is only really viable if you know how to program in one of the programming languages above. If you do, all you need is the IP address for our mail server. This IP address is 172.16.1.11 (please note this address will only work when called from a Freestart server).



Article Details
Article ID: 56
Created On: 07 Jun 2007 10:18 AM

 This answer was helpful  This answer was not helpful
 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Troubleshooter | Downloads
Language:

Help Desk Software By Kayako SupportSuite v3.50.05