https://github.com/embraser01/santagifts
:christmas_tree: Tool to generate a secret-santa list and send mails to each participant
https://github.com/embraser01/santagifts
Last synced: 12 months ago
JSON representation
:christmas_tree: Tool to generate a secret-santa list and send mails to each participant
- Host: GitHub
- URL: https://github.com/embraser01/santagifts
- Owner: Embraser01
- License: mit
- Created: 2019-10-17T12:34:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-27T21:25:56.000Z (over 5 years ago)
- Last Synced: 2025-01-27T11:33:01.986Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 25.6 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# santagifts
This project can generate pairs for a secret santa and send emails to each participants.
## Example
Just run:
```bash
yarn dlx santagifts config.json
```
With `config.json`
```json5
{
"subject": "Secret-santa",
"content": "Hey {src.name}, this year you will make a gift to {dest.name} (email: {dest.email})",
"sendEmails": true,
"logToStdout": false,
"people": [
{
"name": "John",
"email": "john@example.com"
},
{
"name": "Marc",
"email": "marc@example.com"
},
{
"name": "Lea",
"email": "lea@example.com"
},
{
"name": "Ann",
"email": "ann@example.com"
}
],
// Exclusions prevent people from receiving/sending other people
"exclusions": [
// Here, John, Lea and Ann will never pick each others
["John", "Lea", "Ann"]
],
// Rules is a simpler system where you prevent someone to pick someone else
"rules": [
// Here, Marc will never pick Lea
["Marc", "Lea"]
]
}
```
## Sendgrid
Emails are sent through [sendgrid](https://sendgrid.com). You'll need a `SENDGRID_API_KEY`
environnement variable to send mails.
> You can set this env variable through a `.env` file in your working directory