Introduction To Action Scripts.
• Also See: Action Scripts: Command Reference
Introduction
to action files
As with most list management software, various tasks can be performed by emailing
messages with various subject line commands to the mailer. These tasks are then
processed and the appropriate actions are taken.
The format for these commands is usually:
Subject:
COMMAND
Such as a subscription request (Subject: SUBSCRIBE)
Or
Subject: COMMAND:VALUE1 VALUE2
Such as a document request (Subject: GET-DOC:myfile.txt)
GroupMan comes preconfigured with several common subject line commands, but also offers the option for you to create your own subject line commands.
This is accomplished using action files. These action files contain short scripts for each subject received.
There should be 3 of these action files for every list you create. They are:
PUBLIC ACTIONS FILE
The public actions file should contain subject line commands that are available to the general public. Commands such as SUBSCRIBE and HELP.MEMBERS ACTIONS FILE
The members action file should contain subject line commands that should only be available to subscribers of the list, such as ADDFILE, REPOST, DIGEST-ON, DIGEST-OFF, etc.OWNERS ACTION FILE
The owners action file should contain subject line commands that are only available to the list owner as well as all of the commands contained in the members actions file.
GroupMAN will automatically decide which file to use based on the incoming message header information.
ADDING
NEW ACTIONS
If you want to add a new action to one of the actions file, you would use the
following format:
SUBJECT
{
ACTION|VALUE1|VALUE2|VALUE3
ACTION|VALUE1|VALUE2|VALUE4
}
Here are the parts broken down:
SUBJECT
The command part of the subject line. If the subject wereSubject: GET-DOC:myfile.txtThis
would be: GET-DOC
ACTION This is one of the action commands. (See)
VALUEx The values to be sent to the action command. You can type in what you
would like these values to be or you can use any of the variables available
from the System Variables Table. If you wanted to use the values passed on the
subject line in the message you would use %1%, %2% and so on.
Examples:
The following would look for the subject HELP and send out the help.txt file in your templates directory to the requestor.
Subject
Line says:
HELP
Script is:
HELP {
AUTOREPLY|%From%|help.txt
}
In the next example, GroupMan looks for a subject line requesting a text document and mails it to the requestor.
Subject
Line Says:
GET-DOC:myfile.txt
Script is:
GET-DOC {
AUTOREPLY|%From%|%1%
}
Now let’s take the same example and send a separate confirmation as well
as the document that was requested. We have stored the confirmation in a file
in our templates directory called filesent.txt.
Subject
Line Says:
GET-DOC:myfile.txt
Script is:
GET-DOC {
AUTOREPLY|%From%|%1%
AUTOREPLY|%From%|filesent.txt
}