| Product
Description Table of Contents Introduction Features Installation Calling the CGI Form Field Names Reserved Form Fields Adding Reserved Field Names to a Form Template File Formatting Mail Template Files Receipt/Visitors Template Save Results Template Confirmation Page Field Validation Range Validation Field Calculations Calculation Results Formatting System Processing Sequence Security Run Key Error Messages Examples |
(localhost only enabled)
|
||||||||||||||||||||||||||||||||||||||||
SEND IT! is an email engine that allows you to send your form data to email addresses, plus much, much more. SEND IT! is an Intel binary executable for Windows 95 and Windows NT. SEND IT! is feature rich. It contains the following:
Also, SEND IT! can be used to require field entry, validate the entry, and save the data in a defined format without sending an email message. Each of these features will be covered in detail. To install SEND IT! place the sendit.exe file into a folder that allows execution of CGI scripts. That's all there is to it. There are no system files, parameter files, etc. For FrontPage 2000 Users: In the FrontPage Editor, with the folder list displayed (View | Folder List), if a cgi-bin folder does not already exist, create one by selecting the first entry in folder list and clicking on: 1. File
7. Click the Allow scripts or programs to be run. Now import the sendit.exe file into the newly created directory. 1. Double click the just created folder to open it.
4. Click Add File
6. Double click sendit.exe Now you should be ready to use SEND IT! Calling
the CGI program (sendit.exe) <form action="cgi-bin/sendit.exe" method="POST"> For FrontPage 2000 Users: To include the sendit.exe into your forms, right click inside the dashed area of the form. Click Form Properties and the following dialog box will appear:
Select Custom ISAPI, NSAPI, or CGI Script as the form handler, click Options.
Enter the location of the sendit.exe file as the action and set the Method to POST if not already set. Click OK and the Form Properties dialog will reappear. Next, click Advanced to enter the required reserved field names in the Hidden Fields box. Click Add and the following dialog box will appear.
Enter the reserved word in the Name text box and if the reserved word requires a value, enter it in the Value text box. To enter a reserved word that does not have a value, enter a space. The following are required reserved words: Either SMTP or NoMail and refer. See the Reserved Fields Names for a complete listing. Click OK on all open dialog boxes. Form Field Names Field names that begin with a $ are reserved for the defining of calculation expressions (see Field Calculations below). Fields that begin with a # are reserved to contain a field validation pattern string (see Field Validation below). Fields that begin with a ! are reserved for the defining of a range (see Field Range Validation below). There are three special preface tags that can be used with field names to denote special action by SEND IT!
Reserved Field
Names SMTP -- the Simple Mail Transport Protocol server domain name. This is most often your email server used to send email. <input type="hidden" name="SMTP" value="mail.server.com"> Required if NoMail is not present. refer -- (Required) the location of the page to be displayed next. Please note that a FrontPage Confirmation Page will work with this feature. <input type="hidden" name="refer" value="confirmation.htm"> Note that links to images and hyperlinks must be absolute references - image/yourimage.gif should be /images/yourimages.gif. RCPT -- the recipient of the email message. At least one must be
defined with multiples allowed. From -- the email address of the person sending this
email. It is
normally included in the form as the visitor's email address. It is validated using the
pattern "[\a]+@[\a.]+" (see Field Validation
below).The from field allows the receiver of the email to reply just by doing a Reply to
Sender. DEBUG -- if the debug parameter is defined, SEND IT! will display
the passed form field name value pairs that it receives, in the order received. This
information is formatted so that if required fields are present in the form they are shown
in red. Example output LineWrap -- defines the character position that a line in an emailed
template should be wrapped to the next line. This will not cause a line to be concatenated
to another line. The point that the line is broken is not tested for word boundary and
many break inside a word. All wrapping occurs after field value subsitution. Field value
subsitution may expand or contract a lines length. The default line length is 2048
characters. ENV -- if the env parameter is defined, SEND IT! will display SEND IT!'s environment variables. Example output <input type="hidden" name="ENV" > Note for FrontPage users -- FrontPage will not allow you to not enter a value for a hidden input field, so just enter a single space. CC -- holds courtesy copy email address to send a copy of this email message. One or more can be present in the form. <input type="hidden" name="CC" value="csr@yourdomain.com"> BCC -- holds blind courtesy copy email address of a recipient of this email message. One or more can be present in the form. <input type="hidden" name="BCC" value="csr@yourdomain.com"> Subject -- the subject of the email message <input type="hidden" name="Subject" value="Big Order!"> If not present, then the email is sent with a subject of "No Subject Provided". Header -- An HTML file that becomes the header for informational message produced by SEND IT!, e.g., required fields, range values are incorrect, or a field does not match a field validation pattern. All the information in the file up to but not including the </body> tag is used. <input type="hidden" name="Header" value="header.htm"> Example output. Footer -- An HTML file that becomes the footer for informational messages produced by SEND IT! (see Header). All information after the <body> tag is included. <input type="hidden" name="Footer" value="footer.htm"> Example output. DateTime -- DateTime is an intrinsic field that may be used to display the date and time of the message. It is formatted according to RFC 1152 (Do Not Define This Field) Example. EmailVisitor -- Tells SEND IT! to send a single email to the
visitor using the From field. The value of EmailVisitor is the location of a template to
be used for this e-mail. VSubject -- the subject to be used for the EmailVisitor
email. If not
provided, then defaults to Subject VFrom -- the from value to be used so that the visitor can reply to
this email message. If not provided, then defaults to From -- an
email sent from the
person being emailed. Save Results File -- the location to save the forms data. The save
results file is used to save the values passed in from the form. <input
type="hidden" name="Save Results File"
value="saveresults.htm"> SaveTemplate -- the location of a file to use as a template for the save results file (see Template File Formatting). <input type="hidden" name="SaveTemplate" value="savetemplate.htm"> Example. Timeout -- the value in seconds that the system will wait for the
saveresults file to become free if in use by another process. It defaults to 5. Adding Reserved Field
Names to a form <input type="hidden" name="Reserved Field name" value="Field Value"> Replace the Reserved Field name with one the reserved field names above and replace the field value with the value required by the reserved field name if it is required. Right click inside the dashed form area, then click properties and the following dialog will appear:
Click Advanced and the following dialog will appear:
Click Add and the following dialog will appear.
Enter the name of the reserved field name and the value to be used. Click OK until you're back at the FrontPage Editor. Continue until you have all of the reserved fields defined that you wish to use. Template
File Formatting [First Name] Thanks again. SEND IT! Society The [First Name] and the [From] will be replaced by their values passed in from the form and the entire contents appended to the Save Results File. Substitution will expand or contract the [fieldname] parameter to the size of the actual value data passed in from the form. It is advisable to set the maxlength attributes of entry fields or use the field validation to control the size. A line of text can not contain more than 4096 characters when it is fully expanded with its substitutions. It will be truncated to 4096 characters if expansion tries to increase it beyond this limit. Fields must be contained on a single line. Your date of birth is [Your Date of Birth]. -- OK Your date of birth is [Your Date Substitution can be used in the following pages:
Mail Template File The template file is specified by suffixing the action line of the form tag with the location of the template file relative to the root of the domain. For example, if the sendit.exe program is in cgi-bin/sendit.exe and the mailtemp.txt is in the root, then the form tag would look like the following: <form action=cgi-bin/sendit.exe/mailtemp.txt method=post> Receipt/Visitors Template The visitors template is defined by the EmailVisitor reserved field name. The value of this reserved word defines the location of the template file. This location is relative to the root of the domain. An example: <input type="hidden" name=EmailVisitor" value="/visitortemplate.txt"> Save
Results Template File <input type=hidden name="SaveTemplate" value="_private/save.txt"> The location of the saved data is specified by the Save Results File field name. It also is relative to the root of the domain. If a SaveTemplate is not included in the passed field names, the data is saved in columnar fashion in the Save Results File. If the Save Results file cannot be found, one will be created. If the file already exists, the information will be appended to the end of the file. The template file can be created using any ASCII editor. An example of a comma delimited file with three fields (name, address, email) would be: "[name]","[address]","[email]" Note the double quotes to escape the inclusion of commas in the visitor's input. Each visitor's data would be appended to the Save Results File in the order received. If the file were going to be input into an Excel spreadsheet, where the first line would define the column name, then pre-create the Save Results File with the line. Name,Address of Visitor,Email Address Confirmation Page <input type=hidden name="refer" value="_private/thanks.htm"> If the confirmation page contains field names in brackets, they will be replaced with the information passed in via the form. This can include field calculations, default values, etc. Field substitution in the Confirmation page is allowed and works the same as any other template file. Please note that FrontPage and other html editors can and will break lines at unexpected places. If you have a substitution that is not working, look at the source to see if the [field name] is not split across two lines. Note: Because the confirmation page is read and written by SEND IT!, the directory reference currently available to the browser is at the location of the sendit.exe file. This means that all image and hyperlinks must be relative to this directory. For example, if your images are stored in images relative to the root and if the sendit.exe were being run from cgi-bin relative to the root, then the image location would need to be specified as /images/myimage.gif. Links referring to pages at the root would need to be specified as href=/mypage.htm. Field
Validation The pattern is entered into the form as a hidden field with the same name as the field to be checked but beginning with a # sign. For example, if you have a phone field named phone, then the pattern would be named #phone. Please note that if the field to be checked is defined using the preface tags req. and def., these tags should not be used with field specifier field names -- use #name. Never use #req.name or #def.name. A pattern is made up of a character or range of characters and optionally followed by an iterator. The characters can be comprised of:
Examples: a - match the lowercase character a. Iterators:
Examples of iterator usage: a* - match zero or more of the character a. An example: 4024318642 The pattern required to allow entry of all of the above options is: (?[0-9]{3})? ?[\d]{3}-? ?[\d]{4} Expression Parsing and Calculation Any of the passed input fields can be used in the formula. For example if the fields Quantity and Price were passed in and an expression of $extended was defined with a value of Quantity*Price, the results would replace the formula with the extended amount. The results can be used in additional expressions as long as the results have been computed prior to their use, or the value used in the expression will be zero. Expression fields are computed in left to right, top to bottom manner. If a non-expression field is used which does not contain any numeric, then the value used will be zero for the fields value. If the field starts with a numeric, the numeric digits up to the first non-numeric, excluding the decimal point and the uniary symbols + and -, will stop the scan. All values are converted to floating point numbers. Expression Results
Formatting Range Validation The range bounds (lower and upper) are specified by including them separated by a comma, i.e., 120,150. The range may include leading + or - and a decimal point. The maximum characters, including the sign and decimal point, is 16. In no case can the upper bound be less than the lower bound. The range is inclusive of the lower and upper bounds. An example: The first line requests the visitor to enter their weight, which is required by the system, followed by a field validation specfier that requires the field to contain three digits, zero through nine. Then a range check to see if the value entered was between 100 and 175 pounds, inclusive of 100 and 175. Please note that even though the field, weight, has a preface tag of req., the preface is not used in the field validation definition nor the range validation. System
Processing Sequence
Security Run Key This does not preclude you using SEND IT! on your local machine for testing purposes, i.e., SEND IT! will also allow for a domain IP of 127.0.0.1 or localhost. Smallest positive number: 1.192092896e07F Largest positive number: 3.402823466e+38F Minimum negative integer such that 10 raised to that number is a representable floating-point number. 37 Four fifths rounding is used for all numbers. Error Messages Warning: Error reading from server pipe. %d bytes left to read -- SEND IT! was unable to read from the SMTP server input buffer. Contact support at Webs Unlimited. This script should be used with an Internet browser -- The SEND IT! program can only be ran using a browser This script should be referenced with a METHOD of POST -- The SEND IT! program expects it's input to be provided using the POST method. Check that the form is using a method of POST. SEND IT can not be ran from the browser location or address input line. Field, "%s" contains an invalid character at position %d -- The field %s does not match the field validation pattern. The pattern stopped matching at the position indicated %d. Correct the input and continue. Field, "%s" contains an invalid non-numeric character at position %d in numeric only field. -- The field contains a non-numeric character at position %s in a field that should only have numeric characters. Correct the input and continue. %s must be equal to or greater than %s -- The input value entered into a range validated field contains a number less than the minimum allowed. Correct the input and continue. %s must be less than or equal to %s -- The input value entered into a range validated field contains a number greater than the maximum allowed. Correct the input and continue. The refer file, " %s" can not be found at %s. -- The file %s can not be found at the physical disk location %s. Make sure that the refer file specified location is relative to the domain root and is present. The email template file %s can not found at %s -- The file %s can not be found at the physical disk location %s. Make sure that the email template file specified location is relative to the domain root and is present. The save results template file, "%s" can not be found at %s -- The file %s can not be found at the physical disk location %s. Make sure that the save results template file specified location is relative to the domain root and is present. The Header file, \"%s\" can not be found at %s -- The file %s can not be found at the physical disk location %s. Make sure that the Header file specified location is relative to the domain root and is present. The footer file \"%s\" can not be found at %s <br> at %s The email template file %s can not found at %s -- The file %s can not be found at the physical disk location %s. Make sure that the email template file specified location is relative to the domain root and present. A refresh key word was found in %s<br>Circumventing the intent of the refer page is not allowed! -- The refresh html tag is not allowed in a refer file. Remove the tag and continue. Please complete the form. The following fields require entry: -- An informational message to the visitor listing the fields, by field name -- left to right, top to bottom, that require their input. The iterator ({}) count range is invalid -- The count used in a count specfier {} is invalid. The most likely cause is that it is non-numeric. The pattern %s is not valid at position %d because of -- %s -- The syntax check of a pattern as failed. Correct the condition causing the pattern to not follow syntax. Socket Description: %s -- A description of the WinSock in use. Socket error: %s -- The error message associated with Socket error: %d Socket handle: %X -- The WinSock handle in use. Socket error: %d -- The last error returned by WinSock. SEND IT!: Error %d %s - %d -- A catastrophic error with the SMTP server or limited resources has abended the program.
|
|||||||||||||||||||||||||||||||||||||||||