Skip to content

macielandre/consumer-mailing-notify

Repository files navigation

Consumer Mailing Notify

Consume an input message and send to any email address.

Features

  • Consume from rabbitmq queue
  • Work with encrypted messages
  • Send mail message
  • Validate input messages
  • Tests cover

Corelated links

Installation

Installing dependencies

$ npm i

Setting up environment variables

Create .env file inside env folder from project base path and set with your own values:

SMTP_HOST=<smtp host>
SMTP_PORT=<smtp port>
SMTP_USER=<smtp user>
SMTP_PASSWORD=<smtp password>

APPLICATION_MAIL=<email that will send all application messages, should be registered inside smtp host>

SUBSCRIBE_QUEUE=<queue uri to listen messages (Ex: amqp://localhost)>
AES_256_KEY=<encryptation key>

Running rabbitmq image

$ docker compose up

Starting your project

$ npm start

Message pattern

{
	"receiver": "email@email.com",
	"message": "hello dear friend!",
	"subject": "a letter to a friend"
}

Running tests

$ npm test

Links

Linkedin

Releases

No releases published

Packages

No packages published