A simple script that automates matching and emailing for the Secret Santa holiday event. It takes a list of participants and for each santa participant will pair them with a giftee, notifying all participants of their match.
santas.txt
: list of participants by email and name.email_template.txt
: the message that is sent to each participant.- The email signoff name can be set inside the
docker-compose.yml
.
- The email signoff name can be set inside the
- Credentials for the mailing account will need to be set.
- Install Docker: https://docs.docker.com/docker-for-mac/install/
- A gmail account with permissions to send messages remotely.
- Clone the repo.
- Set local environment secrets for the email account that will be sending the event emails.
- Open
~/.profile
for edit. - Add
SANTA_MAILER_ACCOUNT_EMAIL
to~/.profile
:export SANTA_MAILER_ACCOUNT_EMAIL=<mailer_email_address>
- Replace
<mailer_email_address>
with the email address that will be sending the event emails. - Add
SANTA_MAILER_ACCOUNT_TOKEN
to~/.profile
:export SANTA_MAILER_ACCOUNT_TOKEN=<mailer_app_token>
- Replace
<mailer_app_token>
with the password token for the email account.
- Open
- Reload profile to apply new env variables:
source ~/.profile
- Open
docker-compose.yml
. - Find
SANTA_EMAIL_SIGNOFF_NAME
under theenvironment
section. - Set the signoff name that will be used in the event emails by replacing
<signoff_name>
.- e.g.
SANTA_EMAIL_SIGNOFF_NAME=Christopher
- e.g.
- Save
docker-compose.yml
. - Open
santas.txt
. - Add the email addresses and names of all participants starting at line 2 (under the file header).
- Remove the placeholder email examples at line 2 and line 3.
- Add an email address, a space, then a name for the participant on one line.
- Repeat on a new line for every participant until all event participants have been added to the
santas.txt
file.
- Save
santas.txt
.
docker-compose run --rm secret-santa