Skip to content

copitz/firemailer

Repository files navigation

Firemailer

Write e-mails to Firebase database and let them get sent with Nodemailer

This tiny daemon script monitors a configurable firebase path for emails and passes them to Nodemailer to let them get sent over SMTP or another Nodemailer transporter.

Installation

Docker compose

The quickest way to get this up and running as the docker-compose already contains Docker-SMTP.

git clone [email protected]:copitz/firemailer.git
cd firemailer
docker-compose up

Docker

docker run -v config.js:/opt/app/config.js copitz/firemailer

npm

git clone [email protected]:copitz/firemailer.git
cd firemailer
cp config.example.js config.js
npm install
node app.js

Configuration

Sending an email

Just push an Nodemailer email object to the configured path.

Assuming you set config.firebase.path to "mails" and the firemailer daemon is running, sending an email via firebase is as easy as:

Firebase.database().ref('mails').push({
    to: '[email protected]',
    from: '"Christian Opitz" <[email protected]>',
    subject: 'Hello world',
    text: 'Lorem ipsum dolor sit amet'
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published