The simple service email-sender does specific checks, depending on the user's command, processes the result and sends an email for if it meets a predefined condition.
Currently there are 3 cases. For Case 1 and 2 we are checking specifc text files(Logs). The files are read from FileReader, from there depending on the file, the log is processеd following a specific criteria. After a file is processed, a custom message is prepared and sent to the recipient email. All the email configuration(sender, recipient, host and etc.) can be seen here. In my case I used Outlook, so if you want to configure a different email supplier, you have to change that.
The logic in this case is to check if we have all 3 events("Event-1", "Event-2", "Event-3") for a particular day. The logic can be seen here. If we don't have all 3 events for the day an email will be sent.
The service can be extended by adding more cases. For each one of them you would need to have the a specific implementation, how it will be processed, what message needs to be prepared and sent.
To run the service on your machine you would need to clone the repository on your PC. When this part is done, start the service from here. When the program starts you can type "1", "2" or "3" depending on the case you want to check. For "Case-3", you would need to have the DB setup. Keep in mind that in order for the service to send an email you have to modify the email configuration.