Home

Awesome

openSenseMap Mailer

This project is the mailer used by the openSenseMap-API and other services in the openSenseMap stack. The mailer is a queue based system powered by Redis.

Getting Started

First, install the dependencies:

npm install
# or
yarn

Copy the .env.exmaple file and adjust the environment variables:

cp .env.example .env

This repository also includes a Redis Stack and can be fired up with Docker:

docker compose up -d

To configure Redis use the included local-redis-stack.conf.

Open localhost:8001 with your browser and connect to Redis Insight.

Development

Adding or changing mail templates

Templates are located within this repository under the emails folder. We use react email to create our email templates. Please read the react email docs before adding new templates.

What´s really cool about react email is you get a live preview for the templates and you don´t need to keep sending real emails during development.

To start the live preview run:

npm run studio
# or
yarn studio

Open localhost:3000 with your browser to see the template previews.

Mailer service

The source code for the actual mailer service is located within the src folder. The mailer uses the following technologies:

License

MIT License