Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lipej/mail-worker
Service to receiver messages from ServiceBus and send emails with SendGrid
https://github.com/lipej/mail-worker
java jdk17 queue sendgrid servicebus
Last synced: 4 days ago
JSON representation
Service to receiver messages from ServiceBus and send emails with SendGrid
- Host: GitHub
- URL: https://github.com/lipej/mail-worker
- Owner: lipej
- Created: 2022-01-14T00:32:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-16T15:13:36.000Z (almost 3 years ago)
- Last Synced: 2023-03-07T15:23:27.180Z (almost 2 years ago)
- Topics: java, jdk17, queue, sendgrid, servicebus
- Language: Java
- Homepage:
- Size: 70.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mail-worker
mail worker is just a very simple application who receiver messages with email contents from Azure Service Bus and send it with SendGrid
## Running in your local machine
Clone the project, configure the environment variables and then in your term:
build the project
```bash
./gradlew build
````and run
```bash
java -jar build/libs/mailworker-0.0.1-SNAPSHOT.jar
````## Enviroment variables
You need to set some env variables, you can use IntelliJ IDEA to set and run the app or just do in linux `export ENV="VALUE"` and in windows `set ENV="VALUE"`
need envs
```envSENDGRID_API_KEY=
SERVER_PORT=
AZURE_CONNECTION_STRING=
MAIL_WORKER_QUEUE_NAME=````
## Service Bus Message Body
To receive and process message, the body content of the message need to be
```json
{
"to": "[email protected]"
"from": "[email protected]" //need to be allowed in sendgrid
"subject": "This is an example email"
"content": "Hi, John Doe! this can be a simple text orsome html mail
"
}
````## Routes
This app just have `/health` route to kubernets or heroku see if app is running