Code Monkey home page Code Monkey logo

emailsender's Introduction

Welcome!


API

Bulk Email Sender API:

Overview

This service is responsilble for sending bulk emails efficiently

Clone the repository

git clone https://github.com/pranab-dey/EmailSender.git

Config

This project can be configured with .env

# App
HOST=localhost
APP_PORT=3006
LOGGER_NAME=bulkEmailSender
LOG_LEVEL=debug
NODE_ENV=development

# API Rate Limiting Config
API_RATE_LIMIT_INTERVAL_IN_MIN=1
API_MAX_REQUEST_LIMIT=60

# Mongo DB
# (for Windows) MONGO_DB_HOST=host.docker.internal
# (for mac) MONGO_DB_HOST=docker.for.mac.host.internal

MONGO_DB_HOST=docker.for.mac.host.internal
MONGO_DB_NAME=emailProject
MONGO_DB_USERNAME=mailProject
MONGO_DB_PASSWORD=mailProjectSecret
MONGO_DB_PORT=27019

#Redis
#REDIS_HOST=bulkEmailSender-redis
REDIS_HOST=bulkEmailSender-redis
REDIS_PORT=6379
REDIS_USERNAME=default
REDIS_PASSWORD=secret
REDIS_PREFIX=bulkEmailSender-redis

EMAIL_QUEUE_BATCH_SIZE=2

SENDER_EMAIL=
SENDER_EMAIL_PASSWORD=

Installation

  • copy the docker/env.example and paste into docker/.env
  • copy the docker/docker-compose.override.example.yml and paste into docker/docker-compose.override.yml
  • copy the src/.env.example and past into src/.env
  • set cd to src & run npm install command
  • set cd to docker & run docker-compose up -d --build
  • In case if you're using windows, open docker/app/entrypoint.sh and save end of line sequence as LF instead of CRLF

Check services

After building the docker containers, you'll need to check whether everything is working fine.

  • run docker ps and check all the services are up and running
  • run docker exec -it container_name sh to enter into the app container. [change container_name with appropiate container name found from command]

Setup sender email

  • taking Gmail as an example. Sender email should have two factor authentication enabled. Go to gmail sender account settings, under security, generate custom app password and copy and paste to environment variable.

  • No need to use actual password. otherwise email would be counted as spams.

emailsender's People

Contributors

pranab-dey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.