The "Canned" command will send a form letter (a standard text file) to
whoever sent you the last message. However ZFilter does support a special
format for messages... you can use curly braces ( { and } ) to refer to
variables from the messages, or ones that you have "set" or "create"d. So,
for example, to refer to the variable "date" (the date the message was sent)
you would say {date} in the text of the message. The { and } will be removed
from the message. So, this sample form letter:
Dear {name},
I was enraptured by your recent mail about {subject},
so much so, in fact, that I scarcely noticed that it was sent on {date}
and had {lines} lines. Thank you so much!
Many Thanks
Bob
{signature}
Will end up looking something like this:
Dear Jacob Smith,
I was enraptured by your recent mail about interoffice memo 1023
so much so, in fact, that I scarcely noticed that it was sent on 18 Jun 1996
and had 112 lines. Thank you so much!
Many Thanks
Bob
Bob Wesley
Acting Department Chairperson: Engineering
There are one or two more tricks you may find useful; If you have a
variable that is a number, you can put either a comma (,) or a hash (#),
or both after the name (but still inside the {}s) to have the number
printed differently. If you use a "#", the number will have "st","nd",
"rd" or "th" after it as appropriate. If you use a ",", the number will
have commas every three numbers. For example, assuming the variable
"number" has the value "10303", {number#} will come out as "10303rd",
{number,} will come out as "10,303" and {number#,} (or {number,#}) will
come out as "10,303rd".
That's all there is to it! Other than the {}s, the file used for a canned
response is an ordinary text file. If you didn't put {}s in it, everyone
who got it would get exactly the same thing. You can use the variable
{result} to refer to the output of some previously-run program.
Note: Any spaces inside the {}s will cause ZFilter to ignore it and leave
it as it stands. For example: "{bob's program}" will NOT be replaced
with the variable. Which makes sense, since variables can't be longer than
one word anyway.