Quick Overview
Go to the "Send Mail Page" (reached from the "Professor Page")
and follow the instructions. The page provides a more powerful and
flexible tool for sending mail than the sendEMail.pl
script described below. Both use the same email message templates.
sendEMail.pl
sends e-mail to all students in the classlist whose status in
the classlist file is not "drop" or "withdraw". Optionally, individualized student information
can be merdged into the e-mail message.
sendEMail.pl
takes three or four command line arguments.
The first required argument is the classID.
The second required argument is the full filename of the class list
file (e.g. mth140a.lst). The third required argument is the full
filename of the e-mail template (e.g. email/email.12-7-96) (see below for format)
and the fouth optional argument is the full file name of the merge file (e.g. ../scoring/MTH140A_totals.csv ) (see below for format)
. All files are assumed to
be in the templates
directory. E.G. sendEMail.pl MTH140A mth140a.lst email/email.12-7-96
../scoring/MTH140A_totals.csv
or sendEMail.pl MTH140A mth140a.lst email/email.12-7-96
. In this example, the email message files are contained in an optional subdirectory email
of the templates
directory.
Here is an example of the format of the e-mail message file.
From: apizer@math.rochester.edu
Reply-To:apizer@math.rochester.edu
Subject: test of sendEMail.pl
Message:
Dear $FN $LN,
This is a test of the sendEMail.pl program. The following information
is contained in the class list file.
Your name is $FN $LN.
Your student ID (i.e SS#) is $SID.
Your email address is $EMAIL.
Your login name is $LOGIN.
Your section name is $SECTION.
Your recitation name is $RECITATION.
Your status is $STATUS.
$FN, the following is a blank line.
The following information is contained in the optional merge file.
The entry in the first field for your record in the merge file is $COL[1]. This
entry is identical to your student ID, $SID. The entry in the second field
for your record in the merge file is $COL[2], etc. The entry in the last
field for your record in the merge file is $COL[-1]. The entry in the second
to last field for your record in the merge file is $COL[-2], etc. If e.g.
$COL[45] and
$COL[ -100] are not defined, empty strings will be substituted for $COL[45]
and $COL[ -100]. If e.g. your e-mail address $EMAIL is empty (i.e. your email field
in the the class list file mth140a.lst is empty), the letter
will be filed as a deadletter.
That's all there is to it. The only reserved words are $FN, $LN, $SID,
$EMAIL, $LOGIN, $STATUS, $SECTION, $RECITATION and $COL[...] (upper case is required). All
formating will be exactly as in your e-mail message file. For example, the
(odd) line breaks in the above example will be maintained. The first four
lines of the file must be:
From: <e-mail address>
Reply-To: <e-mail address>
Subject: <some text>
Message:
The actual e-mail message starts on the line below the Message: line as
sendEMail.pl discards the whole Message: line. Thus you should write
...
Message:
Hi $FN,
and not
...
Message: Hi $FN,
The format for the optional merge file is as follows. The merge file is a
delimited file (with the delimiter being $DELIM -- the default is a coma)
where the first entry (or field) of every line (or record) is the studentID
($SID). Normally this file will be the semester scoring data file (e.g. MTH140A_totals.csv) and
entries will be grades on homework sets and exams, letter grades, comments,
etc. Such a file is created by the scoring programs and can be edited and
manipulated with a spreadsheet program such as Excel. If a student does not
have a record in the merge file, all $COL[...]'s in the corresponding e-mail
message will be replaced by empty strings.