๐ป Spring Batch Application to send promotional emails ๐ซ to clients inside of a configured Datasource with Docker ๐ณ.
It is a framework that uses the Java Virtual Machine and the Spring Ecosystem to build batch applications. By definition, batch systems are systems that realize a process of a finite amount of data without interaction or interruption.
To learn more about this framework, view this article on the Notion: SpringBatch Article
It's a job responsible to execute one step that will read clients and products from a configured datasource, process this data linking the product interest to each client and writing and sending an email to the configured recipients two times for each 60 seconds.
- docker
To configure this job, you need to follow some steps:
- First, you need to create an account at MailTrap
- Create a new inbox
- View the SMTP Setting and get the user and password
- With these informations, you need to open the env file .env and put this data at EMAIL_USER and EMAIL_PASSWORD
- After it, you need to get two email addresses you have access to
- Open the file database.sql
- In the lines 30 and 31, you will put these email addresses instead of '[email protected]' and '[email protected]'
With the docker started, execute this command at the project root:
docker-compose up -d --build
Navigate to your Mailtrap Panel and see the sended emails to the respective recipients.
Navigate to your inbox of the emails that you putted like recipients and see the messages.
To stop correctly:
docker-compose down -v
Remember to execute this command each time that you want change the parameter value.
๐ค Pedro Lucas
- Twitter: @PedroLucasOM
- Github: @PedroLucasOM
- LinkedIn: @PedroLucasOM
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a โญ if this project helped you!
Copyright ยฉ 2021 Pedro Lucas.