Detta är vårt nya forrmail script som löser en del problem som den gamla modellen hade. Exempel kan laddas hem här
Det enda du behöver göra är att skriva några rader i din HTML-text och ändra på "vaule=", till de inställningar som passar dig.
<form action = “http://sc.digikom.net/formmail/formmail.asp” method = “POST”> <input type = “hidden” name = “ToEmail” value = “e-postadressen som ska skickas till”> <input type = “hidden” name = “FromEmail” value = “e-postadressen som mailen skickas från”> <input type = “hidden” name = “EmailSubject” value = “ämne(subject) på mailet”> <input type = “hidden” name = “RedirectURL” value = “sökväg för en tacksidan”>
Domänen som anropar scriptet måste finns på Digikoms servrar
Överkurs: -endast på engelska-
Supported Variables
FromEmail: The email address of who filled the form in. <input type="text" name="FromEmail"> The FromEmail will be checked by the script. If it is invalid, and 'NeedEmail' is set to Yes, the user will be given an error message explaining why. If 'NeedEmail' is set to No, the only checking that will be done is if the length is zero; if that is the case, the default address will be used. FromName: Who filled the form in. <input type="text" name="FromName">
ToEmail: Who the email will be sent to. <input type="hidden" name="ToEmail" value="you@your.domain">
ToName: The name of who the email will be sent to. <input type="hidden" name="ToName" value="Bob Smith">
EmailSubject: What the subject of the email will be, <input type="hidden" name="EmailSubject" value="Your form results">
RedirectURL: The URL the user will be redirected to after filling your form out. <input type="hidden" name="RedirectURL" value="http://www.yourdomain.com">
Env_Report: Sends a report of browser type, IP etc with the email; by default it is "No". <input type="hidden" name="Env_Report" value="Yes"
Sort: The order the fields should be sent in. Can be "Alphabetical", "FormOrder" (the order they are in your form, which is the default option) or user specified: "field1, field2, field4, field3,..." etc. <input type="hidden" name="Sort" value="Alphabetical">
Print_Config: The list of config fields to be sent in the email. Configuration fields are "FromName" "ToEmail" "ToName" "Print_Config" "RedirectURL" and "Print_Blank". If none are specified, then none will be sent. <input type="hidden" name="Print_Config" value="FromName,RedirectURL">
Print_Blank: Should blank fields be emailed anyway? By default it is "No". <input type="hidden" name="Print_Blank" value="Yes">
Required: The list of fields which the user must fill out before the form is mailed. If they are not filled out the user will get an error message saying which ones need to be filled. <input type="hidden" name="Required" value="FromEmail,FromName,Comments">
NeedEmail: If the from email address must be valid; can be either "Yes" or "No", with the default being No. If it is invalid with this set to "Yes", the user will be given an error message explaining what is wrong with it. <input type="hidden" name="NeedEmail" value="Yes">
Notes:
1. Sort and Print_Config accept comma delimited values. <input type="hidden" name="Sort" value="FromEmail, Color, DogName, Age, BirthDate"> Alternatively, for the "Sort" field, you can specify either "ALPHABETICAL" or "FORMORDER"; if nothing is specified, "FORMORDER" is assumed by default. <input type="hidden" name="Sort" value="alphabetical">
An unsorted, or alphabetically sorted list does not show any of the configuration variables like ToEmail or FromName. These are the "config variables" and are not shown be default. You may specify to print "config variables" by listing them in either the print_config or the sort fields.
2. Sort will print any form variable you supply, including Print_Config variables. You do not need to specify BOTH a Sort and a Print_Config. However, if you do not want to take the time to sort your variables (such as in a very large form), yet you still want to view your config variables, then the Print_Config parameter becomes useful. When you list variables in the sort field, then only those are printed, the rest are discarded.
To recap, if you want to sort all your variables by hand AND show "config" variables, just list all of them in the sort field and forget about the "Print_Config" field. If you don't feel like sorting all your fields by hand (such as in "ALPHABETICAL", or "FORMORDER") and you still want to print out some of the "config variables", then just list only the config variables in the "print_config" field.... Make sense? :) 3. Env_Report can be set to "YES" or "Y", case insensitive. It reports all of the following: - Remote Address - Remote Host - Referring URL - User Name - Browser Type
4. The only required field is RedirectURL. The rest have defaults. However, combinations of settings can prvide errors, so check your form carefully before publishing it. For instance, if NeedEmail = "Yes", and you don't supply a box for the FromEmail, the user will get a 'You didn't provide an email address" error message.
5. When using the CDONTS mail component, the ToName and FromName don't get used in the email. If you want to see them, you need to specify them in the "Print_Config" section. Alternatively, when you ask a user for their name, you can call it something other than 'FromName'. |