GithubHelp home page GithubHelp logo

caster's Introduction

Caster

A RestAPI for sending emails.

   _________   _____________________ 
  / ____/   | / ___/_  __/ ____/ __ \
 / /   / /| | \__ \ / / / __/ / /_/ /
/ /___/ ___ |___/ // / / /___/ _, _/ 
\____/_/  |_/____//_/ /_____/_/ |_|  

Installation

  1. clone the repo
git clone https://github.com/TRudenko22/caster
cd caster
  1. build the docker image
docker build -t caster .
  1. run the docker image
docker run -p 8080:9000 -p 587:587 -e EMAIL_PASSWORD=<your gmail app password> caster

Usage

The docker image has the two default environment variables set:

EMAIL_SERVER  = smtp.gmail.com
EMAIL_PORT    = 587

These can be changed by passing them in the docker run command and publishing their respective ports

docker run -p 8080:9000 -p <EMAIL_PORT>:<EMAIL_PORT> -e EMAIL_SERVER=<your email server> -e EMAIL_PORT=<your email port> -e EMAIL_PASSWORD=<your gmail app password> caster

Additionally you can use the provided docker-compose.yml as a template for your own deployment.

The API has two endpoints: / - GET - returns a simple message for testing /send - POST - sends an email

The /send endpoint requires a JSON body with the following fields:

{
    "sender": <your email address>,
    "recipients": [<list of email addresses>],
    "subject": <email subject>,
    "body": <email body>
}

Roadmap

  • more robust body parsing
  • better error handling
  • more email providers
  • client application in Go

caster's People

Contributors

trudenko22 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.