Git Product home page Git Product logo

email-service's Introduction

Abstracted Email-service

stdlib.com service

This is an email service built on top of Mailchimp/Mandrill to enable serverless landing pages.

You can see an example here.

It's built on top of stdlib – a microservice provider.

Functions

/email-service/subscribe

function spec | source

This function will subscribe a user to the given Mailchimp list id. You have to have the following environment variables set:

  • MAILCHIMP_KEY – API Key for Mailchimp.
  • MAILCHIMP_LIST_ID – List ID from Mailchimp.

/email-service/subscribe

function spec | source

This function will send an email either using a template or just a plain email from the html/text given to the given user. You have to set the following environment variable on the service:

  • MANDRILL_KEY – API Key for Mandrill.

Here's an example message send. See the docs for sendTemplate and send for the full params.

  const lib = require('lib');

  lib['./send']({
      message: {
          to: [{
              email: "[email protected]",
              name: "Nima Gardideh",
              type: "to"
          }],
          headers: {
              "Reply-To": "[email protected]"
          },
          subject: "This is a test email!",
          from_email: "[email protected]",
          from_name: "Nima",
          html: "<p>This is an email sent from a stdlib email service.</p>",
          text: "This is an email sent from a stdlib email-service."
      }
  }, console.error)

email-service's People

Contributors

nemo avatar

Stargazers

 avatar  avatar

Watchers

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