Navigation:  Accounts Menu > Account Settings > Auto Responders > Creating Auto Response Scripts >

Auto Response Script Samples

Print this Topic Previous pageReturn to chapter overviewNext page

A simple auto response script, using several auto response script macros, might be called VACATION.RSP and look like this:

Greetings $SENDER$

You're message regarding '$SUBJECT$' won't be read by me because I'm on vacation. Hurray!!!

Yours truly,

$RECIPIENT$

You can also use some of the header replacement macros to expand this script and control the headers that will be generated when the auto response message is mailed back to $SENDER$:

Greetings $SENDER$

You're message regarding '$SUBJECT$' won't be read by me because I'm on vacation. Hurray!!!

Yours truly,

$RECIPIENT$

%SetSubject%=RE: $SUBJECT$

%SetAttachment%=c:\photos\me_on_vaction.jpg

Using that script the auto response message will have "RE: " added to the beginning of the subject and have the specified file attached.

The "%SetSubject%=RE: $SUBJECT$" line is handled like this:

1. The $SUBJECT$ portion is expanded and replaced by the original message's subject text. This makes the string equivalent to:

%SetSubject%=RE: Original Subject Text

2. MDaemon replaces the original subject, which it has stored in its internal buffers, with this newly calculated one. From that point forward, any use of "$SUBJECT$" in the script will return the new result.

Note the placement of the new macros - they are listed at the bottom of the response script. This is needed to avoid side effects. For example, if the %SetSubject% macro were placed before the $SUBJECT$ macro, which appears in the second line of the response script, the subject text would have already been changed by the time the $SUBJECT$ macro was expanded. Therefore, instead of replacing $SUBJECT$ with the content of the original message's "Subject:" header, it would be replaced with whatever you have set the value of %SetSubject% to be.

See: