Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.46 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.46 KB

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'
});