Tiny daemon to send mails via firebase database
377
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.
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 run -v config.js:/opt/app/config.js copitz/firemailer
git clone [email protected]:copitz/firemailer.git
cd firemailer
cp config.example.js config.js
npm install
node app.js
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'
});
Content type
Image
Digest
Size
248 MB
Last updated
over 9 years ago
docker pull copitz/firemailer