Secret Santa script for pairing and emailing the sender their gift recipient.
-
Make sure you have a seperate gmail account that you will use for SecretSantaJS
-
Make sure you have node.js setup and run
$ npm install
Open players.json and setup the players that play Secret Santa. Make sure that the email is in the correct format. The format of the player looks like this:
- id - the unique id of the player
- email - email address of the player
- firstname - player first name
- lastname - player last name
- exclude - id of the player to exclude from possible pairs
"johndoe": {
"email": "johndoe@gmail.com",
"firstname": "John",
"lastname": "Doe",
"exclude": "janedoe"
}
Open mailSender.js and change placeholder mail and password to your Secret Santa mail
user: 'GMAIL_USERNAME',
pass: 'GMAIL_PASSWORD'
Change the text of the Secret Santa mail in text
section and make sure that you change the text and the
gift price to whatever price you want. The current email text looks like this:
Merry Cristmas ${senderName}!
You have been selected to be the secret santa for ${pairName}!!!
The gift budget is 10$ !
Have a great 202x! :D`
Run the following command:
npm run presents
- Nikola Dimić - d1mic
This project is licensed under the MIT License - see the LICENSE.md file for details