Controlling the Mail

This page contains information about controlling what is mailed as a result of submitting the form. The e-mail can be to sent to anyone or no one. The subject line and body can contain arbitrary text and may contain references to the fields of the form. Arbitrary mail headers can also be used.

This page is divided into a field reference section and an example setup section.

Example Mail Setups

This section uses HTML 3 elements; if it doesn't make sense on your browser, look at this text version.

Desired SetupField has value of:
_mailto _mailformat _mailsubj _mail[n] _mail_vals
Mail some text (with arbitrary mail headers) as specified in an external file with variable instantiation the e-mail address(es) to send to the external file not set
Mail some text as specified inline with variable instantiation the e-mail address(es) to send to not set the symbol encoded format subject line the symbol encoded format text of the body not set
Mail some fields in the default format the e-mail address(es) to send to not set the symbol encoded format subject line not set the fields you want mailed or "all"
Nothing is mailed "no one" not set

The Mail Fields

_mailto
Meaning: The value of this field is the e-mail address to mail comments to or "no one".
Applies: Always
Default: "no one"
_mailformat [new!]
Meaning: If this field is present, then its value is interpreted as the full path to an external file which is to be used as the format for the mail to be sent. Variable-encoded format conversion is performed on this file. Arbitrary mail headers can be at the top of this file. See the distributed form setups for uses of this.
Applies: When "_mailto" is not "no one"
Default: not present
Errors: if the specified file does not exist or is not readable, an error will be reported and all processing will terminate.
_mailsubj
Meaning: This is the subject line of the e-mail that is sent. Variable-encoded format and symbol-encoded format are used.
Applies: When "_mailto" is not "no one" and _mailformat is not present
Default: "New comments from $username ($realname): %count"
_mail[n] (_mail1, _mail2, ...)
Meaning: If "_mailto" is present, then these fields are sent in the body of the e-mail in order. Variable-encoded format is used as is symbol-encoded format.
Applies: When "_mailto" is not "no one" and _mailformat is not present
Default: not present
_mail_vals
Meaning: If "_mail[n]" is not specified, a default format for the body of the e-mail is used. This whitespace separated list of field names indicates what order to include which fields in in the message. If the value is "all", then all the fields are included in some order.
Applies: When "_mailto" is not "no one" and "_mail1" is not present and _mailformat is not present
Default: "comments"

See Also

o Controlling the display
o Controlling the appending to a file
o Variable encoded format
o Symbol encoded format

[GC Control Fields] [GC Home] [Jim's Home Page] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
25 June 1995