Skip to content

Email sending service worker listening on a queue

Notifications You must be signed in to change notification settings

ronaldofs/mailer-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailer worker

Email sending service worker listening on a queue. Uses pm2 to run the app in production.

Requirements

  • Node.js and npm;
  • AMQP server;

Required environment variables:

  QUEUE_NAME="email-queue"
  QUEUE_URL="amqp://user:password@localhost"
  EMAIL_FROM="Your name"
  EMAIL_ADDRESS="[email protected]"
  EMAIL_PASSWORD="password"
  EMAIL_SERVICE="Gmail"

Running

Run with npm start on development and npm run production for production.

Running with docker

Add to your docker-compose.yml:

mailer:
  build: .
  environment:
    - NODE_ENV: production
    - QUEUE_NAME: email-queue
    - QUEUE_URL: amqp://user:password@localhost
    - EMAIL_FROM: Your name
    - EMAIL_ADDRESS: [email protected]
    - EMAIL_PASSWORD: password
    - EMAIL_SERVICE: Gmail

Run your docker-compose file:

$ docker-compose build mailer && docker-compose up -d mailer

About

Email sending service worker listening on a queue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published