Internet Service Provider South Africa | Web Hosting | Web Development | Connectivity | Email | Fax2Mail | Domain Registration | DNS
1
1 home 1 webmail 1 about 1 services 1 support 1 contact 1
 

Form Mailer

The form mailer is centralised for all hosting clients to utilise. The following documentation describes how this JMail component works and how you can use it to send Form Mail from your web site. For those of you that have never used form mailers, this documentation should help you, but a basic understanding of how forms work is essential and we will not go into that detail here.

 Fields:

The form mailer has certain fields which have to be passed to the component in order to work correctly, those fields will now be explained.

ToAddress:
The address where you want the mail to be sent to.

FromAddress:
The address where the mail is coming from. We suggest something like web@yourdomain.co.za

Subject:
The subject of your message.

FromName:
The name of the sender of the message. We suggest something like Your WebSite Name.

DestinationAddress:
The address of the page that the mailer must redirect to after processing the mail. Make sure to include the FULL URL to the page.

Please Note:
These fields can either be hidden values or can be values that the user can enter when filling in the form, this is up to you. The following examples of how the form mailer works will indicate the difference of having the fields hidden or allowing the user to enter the values.

Code:
To see how the code should look in your HTML page, visit the example pages.

Support:
This component has undergone a lot of testing and will work 100% if you follow the instructions carefully.

If you have problems feel free to email support@allafrica.co.za bearing in mind that help with general HTML and Form Creation is not catered for and queries of this nature will go unanswered. We will only answer valid support queries that relate directly to a problem with this component.

Examples:

Example 1: Standard Usage with all required fields Hidden.
Example 2: Custom Usage with some of the required fields entered by the user.

 

This example demonstrates the standard usage of this form with the required fields all hidden from the user.
For the purpose of this example the mail is sent to a non-monitored mailbox so don't expect a reply.

Enter Your Name:

Enter Your Email:


Click Submit

After Clicking Submit, you will be redirected to a thank you page.
The thank you page will be a page of your choice, when this script is running in your site.

The Code for the above form looks as follows:

<form method="POST" action="http://scripts.allafrica.co.za/formmail/mailer.asp">
<font face="Verdana" size="2"><input type="hidden" name="FromAddress" value="scripts@allafrica.co.za">
</font><font face="Verdana" size="2">Enter Your Name:<br>
<input type="text" name="Name" size="20"><br>
Enter Your Email:<br>
<input type="text" name="Email" size="20"><br>
<br>
<input type="hidden" name="ToAddress" value="mailbox@allafrica.co.za">Click
Submit <br>
After Clicking Submit, you will be redirected to a thank you page.<br>
The thank you page will be a page of your choice. <input type="hidden" name="Subject" value="Form Mailer Example 1">
<input type="hidden" name="FromName" value="Script Library">
<input type="hidden" name="DestinationAddress" value="http://scripts.allafrica.co.za/thanks.htm"><br>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></font>
</form>

This example demonstrates a customised usage of this form with the required fields entered by the user.

For the purpose of this example the mail is sent to the address that you enter for ToAddress. We suggest that you enter your own email address for both the FromAddress and the ToAddress.

 

* = Required Fields

*FromAddress: (enter your email address here)

FromName: (enter your name here)

*ToAddress: (enter your email address here)

Subject: (enter a subject for this message)

*DestinationAddress: 
(enter a website address here of your choice, remember to type the full URL eg. http://www.cnn.com)


Now some other fields:
Whats your age:
Whats your hobby:
Whats your best food:
Whats your best tv program:

Click Submit

After Clicking Submit, you will be redirected to the website you entered under DestinationAddress and you will receive this message in your mailbox, provided that you entered your email address correctly.

Please Note: If you leave any of the required * fields in this form blank or enter a value for email that is not an email address ... you will get an HTTP 500 Internal Server Error Message with a Page Not Found Message. 

The Code for the above form looks as follows:

<form method="POST" action="http://scripts.allafrica.co.za/formmail/mailer.asp">
<font face="Verdana" size="2"></font><font face="Verdana" size="2">FromAddress:
(enter your email address here)<br>
<input type="text" name="FromAddress" size="20"><br>
FromName: (enter your name here)<br>
<input type="text" name="FromName" size="20"><br>
ToAddress: (enter your email address here)<br>
<input type="text" name="ToAddress" size="20"><br>
Subject: (enter a subject for this message)<br>
<input type="text" name="Subject" size="20"><br>
DestinationAddress:&nbsp;<br>
(enter a website address here of your choice, remember to type the full URL eg.
http://www.cnn.com)<br>
<input type="text" name="DestinationAddress" size="20"><br>
<br>
<b>Now some other fields:</b><br>
Whats your age: <input type="text" name="Age" size="5"><br>
Whats your hobby:<input type="text" name="Hobby" size="20"><br>
Whats your best food:<input type="text" name="BestFood" size="20"><br>
Whats your best tv program:<input type="text" name="BestTVProgram" size="20"><br>
<br>
Click
Submit <br>
<br>
After Clicking Submit, you will be redirected to the website you entered under
DestinationAddress and you will receive this message in your mailbox, provided
that you entered your email address correctly.<br>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></font>
</form>

 

Copyright © 2008 All Africa Interactive