Send Email
This program fills in a jinja2 template and constructs an email message. You can select the group of people you want to send the email to. The organiser always gets a copy. The email is sent when a mail server is specified. Otherwise it is simply printed on screen.
All variables defined in the Course Configuration file are passed to the template.
The session number is passed by the variable snr.
The list of participants is passed to the template if it contains a varaible users.
The list of users contains objects of type gitlab_course.GLCUser.
Usage
usage: glc_send_email [-h] -t TEMPLATE [-a ATTACH] [-s SESSION]
[-g {participants,waiting,instructors,helpers}]
[-m MAIL] [-f FROM_EMAIL] [-S SUBJECT] [-e MAIL_SERVER]
course
Positional Arguments
- course
the course description file
Named Arguments
- -t, --template
the template to apply
- -a, --attach
attach a file
Default:
[]- -s, --session
the session number
Default:
1- -g, --mail-group
Possible choices: participants, waiting, instructors, helpers
select the group of email recipiants
Default:
[]- -m, --mail
individual email addresses
Default:
[]- -f, --from-email
the email address of the sender, use the organiser email address if not specified
- -S, --subject
the email subject
- -e, --mail-server
the SMTP server to be used