Giter Site home page Giter Site logo

ziggi24 / dotmail Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nvincenthill/dotmail

0.0 0.0 0.0 739 KB

A FERN-stack email bot to programmatically create, template, and send emails

License: MIT License

JavaScript 98.37% Dockerfile 0.47% HTML 1.16%

dotmail's Introduction

dotmail

This is a FERN-stack app to programatically send responsively-designed emails with nodemailer + mjml templates

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

All dependencies listed in package.json.

Create a firebase project for authentication and user data permanence. This project currently supports Nodemailer SMTP connection to gmail.com or AWS SES send email and thus requires a Gmail account or AWS account with a non-sandboxed SES to operate.

Create a folder named data in the root directory to store MJML templates to transpile, inject, and send. See below for example.mjml:

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text font-size="20px" color="red">Hello World</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Create a .env in the root directory with the following:

PORT=3000
FIREBASE_API_KEY='YOUR_API_KEY_HERE'
FIREBASE_AUTH_DOMAIN='YOUR_AUTH_DOMAIN_HERE'
FIREBASE_DB_URL='YOUR_DB_URL_HERE'
FIREBASE_PROJECT_ID='YOUR_PROJECT_ID_HERE'

Installing

To install dependencies

npm install

Development

To run server

npm start

To run webpack

npm run react-dev

To run tests

npm test

API

To send an email with dotmail just POST to /api/send with well-formed JSON:

curl -d 'EXAMPLE_JSON_BODY' -H "Content-Type: application/json" -X POST http://localhost:3000/api/send
EXAMPLE_JSON_BODY

{
  "form": {
    "id": 0,
    "name": "Example",
    "type": "universal",
    "subjectLine": "Example subject line",
    "injections": [
      {
        "name": "exampleInjection",
        "type": "text",
        "data": "This is an example"
      }
    ]
},
  "currentUser": { "name": "John Smith", "email": "[email protected]" },
  "recipients": [
    {
      "firstName": "exampleFirstName",
      "lastName": "exampleLastName",
      "preferred": "examplePreferredName",
      "email": "[email protected]"
    }
  ]
}

Deployment

http://dotmail.tech is our application's home!

Built With

  • Firebase - The OAuth and real-time database
  • React.js - The front-end MVC framework
  • Redux - The state management
  • Express - The server
  • Node.js - The back-end
  • Mustache - The logic-less template system
  • MJML - The framework that makes responsive email easy
  • Jest - The testing framework
  • Enzyme - The testing utilities
  • SuperTest - The http integration testing

Deployed With

  • Docker - The package/container management
  • AWS SES - The flexible and highly-scalable email sending and receiving platform
  • AWS EC2 - The secure and resizable compute capacity in the cloud

Versioning

We use Git for versioning.

Our Trello Board - Check out what we're working on next

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

dotmail's People

Contributors

nvincenthill avatar ferdelamad 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.