|
| 1 | +# Gmail Birthday Sender |
| 2 | + |
| 3 | +This script automatically sends birthday wishes via Gmail. |
| 4 | +You just need to enter your information at beginning. |
| 5 | + |
| 6 | +>[!WARNING] |
| 7 | +>This script lacks strong security for your email |
| 8 | +
|
| 9 | +## Requirements |
| 10 | + |
| 11 | +- Python 3 |
| 12 | + |
| 13 | +## Instructions |
| 14 | + |
| 15 | +1. Create google account |
| 16 | +2. Turn on [2-Step Verification](https://support.google.com/accounts/answer/185839) |
| 17 | +3. Create [an application password](https://support.google.com/accounts/answer/185833#zippy=%2Cremove-app-passwords) |
| 18 | + |
| 19 | +### Enter your information in `main.py` |
| 20 | + |
| 21 | +- Enter your gmail account, your name and application password |
| 22 | + |
| 23 | +```py |
| 24 | +your_name = "your_real_name" |
| 25 | +your_email = "your_account@gmail.com" |
| 26 | +password = "your_gmailpassword" |
| 27 | +``` |
| 28 | + |
| 29 | +- Enter recipient's information here |
| 30 | + |
| 31 | +```py |
| 32 | + # Change John to recipient's name |
| 33 | + "John": { |
| 34 | + # Change john@example.com into real recipient's email |
| 35 | + "email": "john@example.com", |
| 36 | + # Change Month and Day of a birthday |
| 37 | + "birthday": datetime.date(1995, 12, 31), |
| 38 | +``` |
| 39 | + |
| 40 | +(Example) |
| 41 | +Name: John |
| 42 | +Email: john@example.com, |
| 43 | +Year, Month and Day of a birthday: 1995, 12, 31 |
| 44 | + |
| 45 | +- Enter absolute path to a attachement file if you want |
| 46 | + |
| 47 | +```py |
| 48 | + "attachment": "/path/to/john_card.pdf" |
| 49 | + }, |
| 50 | +``` |
| 51 | + |
| 52 | +If you don't need, write `None` instead |
| 53 | + |
| 54 | +```py |
| 55 | + "attachment": None |
| 56 | +``` |
| 57 | + |
| 58 | +### Run the script |
| 59 | + |
| 60 | +After you're done installing Python and pip, run the following command from your terminal to install the requirements from the same folder (directory) of the project. |
| 61 | + |
| 62 | +```bash |
| 63 | +pip install -r requirements.txt |
| 64 | +``` |
| 65 | + |
| 66 | +After satisfying all the requirements for the project, Open the terminal in the project folder and run |
| 67 | + |
| 68 | +```bash |
| 69 | +python dictionary.py |
| 70 | +``` |
| 71 | + |
| 72 | +or |
| 73 | + |
| 74 | +```bash |
| 75 | +python3 dictionary.py |
| 76 | +``` |
0 commit comments