🚀 Automating Student Leave Warnings Using Python (CLI + SMTP)

📌 Introduction
Managing student leaves manually can be tedious. What if we could automate the process of sending warning emails when students exceed a set leave limit? 🤔

That’s exactly what I built—a CLI-based Student Leave Warning System using Python…


This content originally appeared on DEV Community and was authored by iam_flash

📌 Introduction
Managing student leaves manually can be tedious. What if we could automate the process of sending warning emails when students exceed a set leave limit? 🤔

That's exactly what I built—a CLI-based Student Leave Warning System using Python and SMTP! This project helps track student leaves and automatically sends a warning email if the leave count exceeds 3.

🔧 Features of the Project
✅ Simple Command Line Interface (CLI) for student input.
✅ Automatically sends an email if leave count > 3.
✅ Uses SMTP (Simple Mail Transfer Protocol) for email notifications.
✅ Easily customizable and extendable.

⚙️ How It Works
1️⃣ User Input (CLI-Based)
When the script runs, the student is prompted to enter:

Name
Subject
Total Leaves Taken
2️⃣ Checking Leave Count
If the leave count exceeds 3, the program triggers an email warning.

3️⃣ Sending an Email (SMTP)
Using Python's smtplib, the script sends an email to the student's registered email.

📩 Example Email:

pgsql
Copy
Edit
Subject: Leave Warning Notification

Dear [Student Name],

You have exceeded the allowed leave limit (3). Please ensure attendance compliance.

Regards,

Admin
🚀 Getting Started
1️⃣ Clone the Repository
bash
Copy
Edit
2️⃣ Install Dependencies
Ensure Python is installed and install required libraries:

bash
Copy
Edit
pip install smtplib
3️⃣ Configure SMTP Settings
Modify the script to use your email credentials:

python
Copy
Edit
EMAIL_ADDRESS = "your-email@gmail.com"
EMAIL_PASSWORD = "your-app-password"
⚠️ Tip: Use an App Password instead of your actual password for security.

4️⃣ Run the Program
bash
Copy
Edit
python main.py
💡 Future Improvements
🔹 Store leave records in a database.
🔹 Add a GUI interface for better user interaction.
🔹 Enable multiple email provider support.

📂 GitHub Repository
Check out the complete source code on GitHub:
🔗 https://github.com/abhinandan2540/My-PyNakama/tree/main/CLI_Attendence

🚀 Final Thoughts
This project showcases how Python can automate repetitive tasks like sending email notifications. Whether you're a student, teacher, or developer, this project is a great way to explore Python automation with SMTP.

Let me know your thoughts! What features would you add? Comment below! 👇🔥

Python #Automation #SMTP #EmailAutomation #OpenSource #CLI #DevCommunity #Coding


This content originally appeared on DEV Community and was authored by iam_flash


Print Share Comment Cite Upload Translate Updates
APA

iam_flash | Sciencx (2025-02-09T04:10:27+00:00) 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP). Retrieved from https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/

MLA
" » 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP)." iam_flash | Sciencx - Sunday February 9, 2025, https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/
HARVARD
iam_flash | Sciencx Sunday February 9, 2025 » 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP)., viewed ,<https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/>
VANCOUVER
iam_flash | Sciencx - » 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/
CHICAGO
" » 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP)." iam_flash | Sciencx - Accessed . https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/
IEEE
" » 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP)." iam_flash | Sciencx [Online]. Available: https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/. [Accessed: ]
rf:citation
» 🚀 Automating Student Leave Warnings Using Python (CLI + SMTP) | iam_flash | Sciencx | https://www.scien.cx/2025/02/09/%f0%9f%9a%80-automating-student-leave-warnings-using-python-cli-smtp/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.