This project is a command-line-based email client that allows users to manage and send emails to official and personal recipients. The email client supports the following features:
-
Recipient Management:
- The details of official and personal recipients are stored in a text file (
clientList.txt
). - Official recipient records have the format:
Official: <name>, <email>, <designation>
. - Official friends' records include their birthday:
Office_friend: <name>, <email>, <designation>, <birthday>
. - Personal recipients' records include their birthday:
Personal: <name>, <nick-name>, <email>, <birthday>
. - Users can add new recipients to the text file via the command-line.
- The details of official and personal recipients are stored in a text file (
-
Birthday Greetings:
- The email client loads recipient details from the text file into the application.
- On the recipient's birthday, the application sends a birthday greeting email.
- Official friends and personal recipients receive different birthday messages.
-
Recipient Count:
- The system keeps track of the number of recipient objects using static members.
-
Email Logging:
- All emails sent by the email client are saved to the hard disk as serialized objects.
- Users can retrieve information about all the emails sent on a specific day using a command-line option.
The email client supports the following command-line options:
-
Add a New Recipient:
- Add a new recipient to the text file.
- Example:
java Email_Client --add-recipient <details>
-
Send an Email:
- Send an email to a recipient.
- Example:
java Email_Client --send-email <recipient-email> <subject> <message>
-
Print Recipients with Birthday Today:
- List all recipients who have their birthday set to the current date.
- Example:
java Email_Client --print-birthday-today
-
Print Emails Sent on a Specific Date:
- Retrieve details (time sent, recipient, subject, and body) of all emails sent on a user-specified date.
- Example:
java Email_Client --print-emails-sent-on <date>
-
Print Recipient Count:
- Display the total number of recipient objects in the application.
- Example:
java Email_Client --print-recipient-count
- The email sending functionality is correctly implemented, including sending birthday greetings and user-specified emails.
- Object-oriented programming principles are followed for better code organization and maintainability.
- Coding best practices are adhered to throughout the project.
To run the email client, use the provided Email_Client.java
file as the starting point. Make sure to download the javax.mail.jar
package from here and include it in your project for email functionality.