Python-based Secret Santa generator that randomizes participants and sends each one an anonymous assignment via email.
The sending Gmail account is specified in config.py.
- Set
gmail_userto your full Gmail address. - Set
gmail_passwordto a Gmail App Password; not regular password.- App Passwords require enabling 2-Step Verification.
- Generate one here: https://myaccount.google.com/apppasswords
- The script uses standard TLS SMTP (
smtp.gmail.com:587) and works cleanly with App Password authentication.
You can use non-Gmail SMTP credentials as well, as long as the server supports TLS and login authentication.
Players are also specified in config.py.
- Add each participant to the
player_infodictionary as:"Player Name": "email@example.com", "Someone Else": "email@yahoo.com", ...
The name is what appears as their assigned recipient, so include last names if needed for clarity.