entete eBusiness.be
imagegauche
 
 




La FAQ eBusiness

FAQ  > Programming and technique > How can I send a form’s contents by mail ?

You can use the script http://www.ebusiness.be/cgi-public/FormMail.pl instead of your mailto.

You thus have to specify http://www.ebusiness.be/cgi-public/FormMail.pl as action for your form and add a hidden field with the ‘recipient’ name which will include your email address.

Here is a description of the different usable fields in the form:

-  recipient the only mandatory field, specifies the email address to which the mail has to be sent to:
<input type=text name="recipient" value="info@fisch.be">

Several optional fields exist such as :
-  subject allows you to receive an email with a subject. To allow your visitors to specify a subject, place this piece of code in your form :
<input type=hidden name="subject" value="votre_titre">
-  email allows you to answer the form directly if the visitor specified his email address in this field as the From field of the mail is initialised with the visitor’s address. To allow your visitors to specify their email address, place this piece of code in your form:
<input type=text name="email">
-  realname allows your visitor to specify this name and that this name will be used in the From of the email that you will receive. The code to include is :
<input type=text name="realname">
-  redirect allows you to redirect your visitor to an html page of your choice after having sent the form. To redirect your visitors after sending the mail, include this piece of code in your form:
<input type=text name="redirect" value="http://www.votredomaine/page.htm"> don’t forget to specify the correct url.
-  required :allows to specify which fields are necessary so that the form can be sent. If certain mandatory fields are not filled in, the visitor will see a page warning him. It’s possible to combine with missing_fields_redirect to have a customised message page. To render certain fields mandatory, include the following code in your form:
<input type=hidden name="required" value="champs1,champs2">
Instead of champ1 champ2, specify the name of the mandatory fields in your form.
-  sort allows you to specify a sorting order for the data listing in the mail you receive. The code to include is:
<input type=hidden name="sort" value="alphabetic"> to sort out the data in alphabetical order or
<input type=hidden name="sort" value="order:champs1,champs2..."> to sort out the data following an order you’ve defined.
-  missing_fields_redirect allows you to specify the url of the page to which the visitor is sent if certain mandatory fields were not filled in. The code to insert is :
<input type=hidden name="missing_fields_redirect" value="http://www.votre_domaine/erreur.htm">

Notice: Before you can use this form, you have to contact us to warn us you want to use it and specify the url of your website AND to which email address you wish to send mails.
This limits spams.


rect