Skip to content

💻 Spring Batch Application to send promotional emails 📫 to clients inside of a configured Datasource with Docker 🐳.

Notifications You must be signed in to change notification settings

PedroLucasOM/PromotionalEmailGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo: PromotionalEmailGenerator

Version documentation maintenance Twitter: PedroLucasOM

💻 Spring Batch Application to send promotional emails 📫 to clients inside of a configured Datasource with Docker 🐳.

Topics

  1. About SpringBatch
  2. About the Project
  3. Author
  4. Contributing
  5. Show your support
  6. License

1. About SpringBatch

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

2. About the Project

Implemented Job

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.

Prerequisites

  • docker

Configuration

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 'cora75@hotmail.com' and 'domingo56@yahoo.com'

Run

With the docker started, execute this command at the project root:

docker-compose up -d --build

Usage

Seeing the emails in the mailtrap panel

Navigate to your Mailtrap Panel and see the sended emails to the respective recipients.

Seeing the emails in the configured recipients

Navigate to your inbox of the emails that you putted like recipients and see the messages.

Stop

To stop correctly:

docker-compose down -v

Remember to execute this command each time that you want change the parameter value.

3. Author

👤 Pedro Lucas

4. Contributing 🤝

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

5. Show your support

Give a ⭐ if this project helped you!

6. License 📝

Copyright © 2021 Pedro Lucas.

Releases

No releases published

Packages

No packages published