Added email attachment feature and logging system #332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title:
📩 Added Email Attachments & Logging Feature
Description:
This pull request enhances the Automated Mailing System by adding support for email attachments and implementing a logging system to track sent emails. These improvements make the system more robust, user-friendly, and suitable for real-world email automation.
🔹 Features Added:
✅ Attachment Support:
Users can now attach files to emails (e.g., reports, invoices).
Handles missing attachments gracefully by providing a clear error message.
✅ Logging System:
Emails are now logged in email_log.csv with recipient, subject, and attachment details.
Improves traceability and debugging in automated email workflows.
✅ Error Handling Improvements:
SMTP connection failures are caught and displayed.
Prevents the system from crashing due to invalid files.
🔹 How These Changes Improve the Project:
📌 Enhances functionality by allowing file attachments.
📌 Adds reliability with logging, making it easier to track email deliveries.
📌 Improves user experience by preventing unhandled errors.
🔹 Testing Performed:
🔹 Successfully sent emails with and without attachments.
🔹 Verified that sent emails were correctly logged in email_log.csv.
🔹 Simulated SMTP failures to ensure the error handling works as expected.
📌 This PR is ready for review. Let me know if any modifications are needed! 🚀
Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.
README.md
, according to the givenREADME_TEMPLATE.