Send emails with grades from a CSV file and attachments from a folder, using a template. Adapt to your needs.
- Haskell platform
- You will need to
cabal installseveral packages:
- For Hearts, you will also need
- You will need to
- Script works under cygwin. Modifications may be necessary for other shells.
Write an email and save it as
email.txt. For fields that are customized, use a keyword (ex.
email.txtgives a sample.)
- It expects a CSV file with no header and with columns LAST NAME, FIRST NAME, ID, (HW GRADES), HW AVERAGE, EXAM, FINAL AVERAGE.
- Customize it with which fields you want to replace, ex.
- Put all the attachments with students' names in one directory.
./Emailerwith arguments. See
./Emailer "Subject" "from@domain" "cc@domain" "C:/dir/to/files/" "grades.csv" "email.txt" "@domain" "output_name"
Script will try to find attachment corresponding to each person. (Best to name the attachments
LASTNAME_FIRSTNAME.pdf, for example.) For each attachment name it can't resolve, it will ask you to enter the file name.
Script produces one text file for each email.
Run the output file (default:
email_grades). WARNING: This sends out all emails; you may want to check the text files first!
This is a script for pairing people with conversation partners. The flags are:
- -w week number (default: 1)
- -c csv file (default: responses.csv)
- -f from email (default: email@example.com)
- -m match email (default: hearts.txt
- -n no-match email, for people who can't make it this week (default: pass.txt)
- -d odd-one-out email, for an unmatched person when there are an odd number of participants (default: odd.txt)
- -o output file (default:
- -q questions file (default: questions.txt)
- -s output script (default:
script_<week number>) (the no-match script has _n appended to it)
- -i input data (default:
data_<week number - 1>.txt)
- -d output data (default:
- -e file with people to exclude for this week (default:
exclude_<week number>.txt) (a list of emails, one on each line)
NOTE: The CSV reader expects a newline at the end. If you have parsing errors, check that this is true.
- Collect responses with a form (such as this), and download it as
responses.csv. (See note above on CSV parsing.)
- Put the email text in
odd.txt. Put the questions in
data_0.txtwith a list of pairs of ID's of people who already know each other (so they won't be matched), in quotes. The ID is the row number (the first person is 1). Example:
- For week
<k>, write the emails of people to be excluded in
exclude_<k>.txt, each on a separate line.
Example (for week 2):
# create emails ./Hearts -w2 # sends emails for matches ./script_2 # sends emails for unmatched ./script_2_n