version 1.0
© Martin Auer 2004
You can make copies for personal use
but you are
not allowed to distribute this program in
any way, be it commercially or non-commercially.
Unpack the ZIP-file into any directory. The directory will contain the following files:
cushymailform.php
_vorlage.cm
_vorlage.css
_template.cm
_template.css
Additionally it will contain a subdirectory named
sec.
The subdirectory will contain the following files:
cushymailform_admin.php
.htaccess
The .htaccess file doesn't contain any data. It is just a reminder and should be replaced with your own. The purpose of this arrangement is to enable you to password protect the admin page with .htaccess. If you do not know how to password protect a directory with .htaccess, you will find instructions here: http://wsabstract.com/howto/htaccess3.shtml
Upload the whole arrangement to your website. The adminform and the mailform will not work together correctly if the adminform is not in a subdirectory below the mailform.
In the adminform (cushymailform_admin.php) you define an ID, e.g. headoffice, and the settings related to it.
On your webpages you create links to
the mailform in this fashion:
<a href = "../path/to/cushymailform.php?id=headoffice">contact</a>.
You can use this to define different preset subjects depending on which page the user comes from, or you can use this to create a contact list of different departments, or to adapt the mailform to different stylings of the pages and so on.
In cusyhmailform_admin.php you will see on the left side a list of all the available sets of settings. In the beginning there should be two: _template and _vorlage. These are, as the name suggests, templates you can use, one for English and one for German. Whereas the script exists only in English and German the mailform itself can be adapted to any language. If you click on one of these links the related settings will be loaded into the form.
The first item is the ID that you will use in the link (or rather in the query-string appended to the link). If you create the ID headoffice the settings will be saved in the file headoffice.cm and the new ID will appear in the list in the leftmost column. If you want to use headoffice as a template for the next set, just load it into the form, change the ID and whatever else you wish to change and press the Save button. If you tick delete the settings belonging to this ID will be deleted and the ID will disappear from the list.
The next item is the stylesheet you want to use for this instance of the mailform. You can enter the URL or - if the stylesheet is situated in the same site - the path. Do not use the path from the admin form's directory, but from the mailform's directory to the stylesheet, because it is the mailform that will be looking for it. Of course you can keep _vorlage.css, this very elegant grey-white-black style you see in the beginning :).
The mailform contains four classes you may want to add to your stylesheet: .cusyhmail_layout_table is the outer <table> that is used to position the navigation bar and the mailform. .cushymail_layout_cell is the class for the <td> cells of this table. .cusyhmail_table is the inner <table> that contains the mailform, .cushymail_cell is the class for the <td> cells of this inner table.
As your site uses PHP you will possibly have a navigation bar containing the principal links of your site. Enter URL or path (again from the cushymail directory) and select if you want the navigation bar to appear on top or left.
Title is a line that will appear over the mailform and also in the title bar of the browser window.
Recipient email: The email-address you want the mail sent to. This address will not be seen in the mailform.
Recipient name: In the second column enter the label that you want to appear in the mailform, e.g.: To, Message for, Department:, or whatever you like. In the third column enter the Name of the recipient. The Name will appear in an input field that is readonly, so it cannot be changed by the user.
Sender name: In the second column enter the label, e.g.: Sender name, Your name. You cannot enter anything in the third column for obvious reasons.
Sender email: Enter a label in the second column, nothing in the third.
Subject: Enter a label in the second column. In the third column you can enter a preset subject. In the fourth column you can make this subject readonly. If you tick this, the user will not be allowed to change the subject or add anything to it.
Copy: In the second column enter a label asking the user if he/she wants a copy of the message sent to their email address.
Message: In the second column enter a label. In the third column you can enter a preset message. In the fourth column you can even make this message readonly. Do this only if you have a very good reason for it. If you want to drive your users mad, leave the field empty and make it readonly. But don't blame me if you don't get much mail.
Thank you-message: Will appear after the user has sent his/her message.
Autoresponder sender: Enter the sender name you want to appear in the autoresponder message. If you don't enter a name, the recipient name (6th item) will be used.
Autoresponder email: Enter the email you wish to appear in the autoresponder message. Please consider that some mail filters don't pass on mail that has a non existing email address as sender address. If you don't enter an email, the recipient email (5th item) will be used.
Autoresponder message: Enter the message you wish to be sent by the autoresponder. If you don't enter a message, no autoresponder message will be sent.
Carboncopy: Enter an email address if you wish a carboncopy to be sent to a second recipient. If you don't enter an email, no carboncopy will be sent.
The last items are error messages that will appear if the mailform is not completed correctly. Please adapt these to the language and to the style of your site.