Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manoelpiovesan/quarkus-email-sender
Quarkus API to send emails via Gmail SMTP
https://github.com/manoelpiovesan/quarkus-email-sender
backend gmail mailer quarkus smtp
Last synced: 26 days ago
JSON representation
Quarkus API to send emails via Gmail SMTP
- Host: GitHub
- URL: https://github.com/manoelpiovesan/quarkus-email-sender
- Owner: manoelpiovesan
- Created: 2024-02-22T15:34:41.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-28T15:39:36.000Z (10 months ago)
- Last Synced: 2024-02-28T16:52:35.495Z (10 months ago)
- Topics: backend, gmail, mailer, quarkus, smtp
- Language: HTML
- Homepage:
- Size: 3.53 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quarkus Email Sender
This is a simple example of how to send an email using Quarkus and Gmail SMTP.
### Endpoint
```
POST localhost:8080/email
``````json
{
"email": "[email protected]",
"subject": "Subject",
"message": "Message"
}
``````
GET localhost:8080/email
``````json
[
{
"id": 1,
"email": "[email protected]",
"subject": "Subject",
"message": "Message"
}
]
``````
GET localhost:8080/email/{id}
``````json
{
"id": 1,
"email": "[email protected]",
"subject": "Subject",
"message": "Message"
}
``````
DELETE localhost:8080/email/{id}
``````
NoContent
``````
GET localhost:8080/email/count
``````json
1
```### Build image
```shell
./gradlew clean build
``````shell
docker build -f src/main/docker/Dockerfile.jvm -t manoelpiovesan/quarkus-email-sender-jvm .
```### Configure environment variables in docker-compose.yml
```shell
QUARKUS_MAILER_USERNAME: [email protected]
QUARKUS_MAILER_FROM: [email protected]
QUARKUS_MAILER_PASSWORD: your_password
```### Configure environment variables in docker-compose-swarm.yml
```shell
QUARKUS_MAILER_USERNAME: [email protected]
QUARKUS_MAILER_FROM: [email protected]
QUARKUS_MAILER_PASSWORD: your_password
```### then, up the docker compose or docker compose swarm stack
docker compose
```shell
docker compose up
```docker compose swarm
```shell
docker stack deploy -c docker-compose-swarm.yml quarkus-email-sender
```