Contact Form Processing Products - for all your needs

FormMail • Form Encryption • Hosted Forms


This page documents the TEMPLATEURL configuration setting in FormMail.

Type Of Setting

TEMPLATEURL is an OPTIONAL setting, which means...

OPTIONAL : you can change this setting if you need to, but the default value is fine for most circumstances.


Sets the URL for template files.


Set TEMPLATEURL to the URL where template files can be fetched. If you set TEMPLATEDIR too, that takes precedence and TEMPLATEURL is ignored.

TEMPLATEURL is analogous to TEMPLATEDIR, but allows for templates to be read from a web server. This is useful for cases where you want the template to be generated dynamically via a PHP script, for example.

You can use $SCHEME and $SERVER to refer to your own server. However, this relies on your server providing PHP with the correct information. If you have problems with these features, use an explicit literal URL.

Note that the HTTP_USER_AGENT string is passed to any URL opened through TEMPLATEURL with a parameter, for example:

This is useful for dynamically generated pages which generate different content depending on the user's browser.

Note that the actual template URL is created by appending a '/' and the file name you provide in the form (with good_template, bad_template, HTMLTemplate, or PlainTemplate) to the TEMPLATEURL setting. But, for security reasons, any path components preceding the file name are stripped. For example, with

<input type="hidden" name="good_template" value="path/to/ok.htm" />

the good_template value is stripped down to:


before being appended to TEMPLATEURL.

Default Value




See Also