 Flexmail Änderungen
FlexMail has been replaced by a different system which requires you to make a few adjustments to your .flx files.
The new system is mostly compatible with the old FlexMail and you don't even need to change your file endings -- .flx works ok.
The previous FlexMail documentation is available here
The main difference is that the <REQUIRE> tag comes after the <ERROR> tag.
Normally the structure of your .flx file should be like this:
Creating an error message and then testing the required variables to see if the error should be displayed.
<ERROR> your error code goes here -- html or plain text </ERROR>
<REQUIRE var1> <REQUIRE var2> <REQUIRE var3> <REQUIRE var4> <REQUIRE ...>
Another difference is that you can no longer use special characters in your variables. Please stick to alphanumeric characters for your variable names (azAZ09) - variable names are case-sensitive.
While constructing your <MAIL> tag, please make sure that there you don't insert more than 1 blank line between <MAIL> and the "To:" tag. Otherwise, the script may have problems finding your recipient's address.
Replace allows you to use a different variable separator other than the percentage sign (%)
Example: <REPLACE>•</REPLACE> allows you to address variables by •var1•
<REPLACE> $ </REPLACE>
Give an answer based on the form entries -- either create a message on the fly or redirect to another page
<RESPONSE> your response code goes here -- html or plain text with variables </RESPONSE>
or
<REDIRECTTO HREF="http://www.mydomain.com/somepage.html">
You can save form data in a tab-delimited file or free form text file.
The text can be appended, overwrite another file or create a unique file.
It is not possible to use variables in the path name of the newly created file. This is a security precaution.
<SAVEDATA filename.txt APPEND | NEW | UNIQUE > var1 var2 var3 ... </SAVEDATA>
or
<SAVECUSTOM filename.txt APPEND | NEW | UNIQUE > your custom data goes here -- plain text or html with variables </SAVECUSTOM>
Another big change is that you can no longer use the built-in variables. If you require these variables, you should enter them into some hidden fields in your forms. This can be done with NetCloak. You can also use JavaScript or PHP if you know those languages. Once the variables are in the form, you can then use them in your .flx files.
Here's the variable change using NetCloak:
- %_Referer% replaced in your form by <INPUT TYPE=hidden NAME="Referer" VALUE="<INSERT_REFERER>"> and used in .flx via %Referer%
- %_UserName% replaced in your form by <INPUT TYPE=hidden NAME="UserName" VALUE="<INSERT_USERNAME>"> and used in .flx via %UserName%
- %_UserAgent% replaced in your form by <INPUT TYPE=hidden NAME="UserAgent" VALUE="<INSERT_CLIENT>"> and used in .flx via %UserAgent%
- %_Address% replaced in your form by <INPUT TYPE=hidden NAME="Address" VALUE="<INSERT_DOMAIN>"> and used in .flx via %Address%
- %_FlexID% replaced in your form by <INPUT TYPE=hidden NAME="FlexID" VALUE="<INSERT_RANDOM 10000>"> and used in .flx via %FlexID%
- %_Date% replaced in your form by <INPUT TYPE=hidden NAME="Date" VALUE="<INSERT_DATE SHORT>"> and used in .flx via %Date%
- %_Time% replaced in your form by <INPUT TYPE=hidden NAME="Time" VALUE="<INSERT_TIME LONG>"> and used in .flx via %Time%
Example:
<FORM>
Your normal form-tags go here...
<INPUT TYPE=hidden NAME="Referer" VALUE="<INSERT_REFERER>">
<INPUT TYPE=hidden NAME="UserName" VALUE="<INSERT_USERNAME>">
<INPUT TYPE=hidden NAME="UserAgent" VALUE="<INSERT_CLIENT>">
<INPUT TYPE=hidden NAME="Address" VALUE="<INSERT_DOMAIN>">
<INPUT TYPE=hidden NAME="FlexID" VALUE="<INSERT_RANDOM 10000>">
<INPUT TYPE=hidden NAME="Date" VALUE="<INSERT_DATE SHORT>">
<INPUT TYPE=hidden NAME="Time" VALUE="<INSERT_TIME LONG>">
</FORM>
In your FlexMail file, you can use the following code (case sensitive variable names):
<SAVEDATA myform.txt>
Referer
UserName
UserAgent
Address
FlexID
Date
Time
</SAVEDATA>
or
<RESPONSE>
The referer was: %Referer% ()
The user name was: %UserName% ()
The user agent was: %UserAgent% (CCBot/1.0 (+http://www.commoncrawl.org/bot.html))
The address was: %Address% (38.103.63.62)
The random ID was: %FlexID% (1289)
The date was: %Date% (20/11/2008)
The time was: %Time% (01:10:17)
<RESPONSE>
For questions, please contact joe@euregio.net
Last modified: 20/11/2008
|