Microservice to send emails
Setup Locally
To run this app locally, you will have to install docker
and docker-compose
.
Copy the content of docker-compose.example.yml
to docker-compose.yml
, you will have to change the value of variable in docker-compose.yml
file on the root folder of the project. Basically, you have to change the information below:
SPRING_MAIL_USERNAME: ********@gmail.com # I'm using GMAIL SMTP service to send the emails, so you will have to inform your own google email
SPRING_MAIL_PASSWORD: ******** # This is not the password of your Gmail account, please, follow this link https://support.google.com/accounts/answer/185833
After setup the information above, run this command(this will generate the images and set up and running the containers):
docker-compose up -d
3 containers will be created: 1 - Database 2 - RabbitMQ 3 - Java microservice(ms-mail)
To test if everything is working, do a POST request in the endpoint localhost:8080:send-mail
with the payload below filled with your information:
{
"ownerReference": "<Reference of owner who is sending the message>",
"mailFrom": "<Email from>",
"mailTo": "<Email to>",
"subject": "<Subject>",
"body": "<Email Text>"
}
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.