This application is an Email Service that consumes requests from a RabbitMQ server and sends mails according with the properties in each message, this properties must be in JSON Format.
Inside of the configuration file there are some properties that need to be set in order to run the application
- Gmail account
- RabbitMQ connection
The Gmail account has two parameters, the email direction and password
---
spring:
#Email
mail:
host: smtp.gmail.com
username: [email protected]
password: somepassword
This connection will provide the queue of messages so that the application read and will send them to the recipients..
---
spring:
rabbitmq:
host: 192.168.187.133
port: 5672
username: rabbit
password: rabbit1
- mvn install
- mvn spring-boot:run
The application can be tested sending a new message to the RabbitMQ Server using a terminale
$ rabbitmqadmin publish exchange=cmsExchange routing_key=user.created \
properties='{"content_type":"application/json"}' \
payload='{"name": "Joel Santos", \
"to":"[email protected]", \
"from":"[email protected]", \
"body":"Welcome to CMS Challenge", \
"subject":"Signup CMS"}'