This Java application demonstrates the use of the Factory Method design pattern for creating different types of recipients. It also employs the Serialization pattern for persisting email objects.
This application allows you to manage recipients and send emails. It provides the following functionalities:
To add a new recipient, follow the format below:
- Official: name,email,position
- Office_friend: name,email,position,yyyy/MM/dd
- Personal: name,nick-name,email,yyyy/MM/dd
Input format: email, subject, content
Input format: yyyy/MM/dd (e.g., 2018/09/17)
Input format: yyyy/MM/dd (e.g., 2018/09/17)
To view the total number of recipient objects in the application, select option 5.
To exit the Email Client, select option 6.
The Factory Method pattern is used in the MakeRecipient class to create different types of recipients (Official Employee, Office Friend, Personal Friend) based on user input.
The Serialization pattern is employed to persist email objects. Serialized email objects are stored in emailDetails.ser.
This application uses Java's built-in libraries and does not require any external dependencies.
Update the sender's email and password in the SendEmail class to use your own email account for sending messages.
final String from = "your_email@gmail.com";
final String password = "your_password";This application automatically sends birthday emails on the recipient's birthday. This functionality is triggered when you run the application on the recipient's birthday.
- Kryko.
Note: This README provides an overview of the Java application. Make sure to customize it with specific details relevant to your project.