GithubHelp home page GithubHelp logo

escapin-sendmail's Introduction

sendmail

An application that send emails using Mailgun API

Usage

$ cd examples/sendmail

$ escapin

$ cd build

$ serverless deploy
Serverless: Bundling with Webpack...
Time: 5419ms

...

.......................................................................................
Serverless: Stack update finished...
Service Information
service: sendmail
stage: dev
region: us-east-1
stack: sendmail-dev
resources: 29
api keys:
  None
endpoints:
  GET - https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv
  DELETE - https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv/{id}
  GET - https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv/{id}
  POST - https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv
functions:
  csvGETFunction: sendmail-dev-csvGETFunction
  csvIdDELETEFunction: sendmail-dev-csvIdDELETEFunction
  csvIdGETFunction: sendmail-dev-csvIdGETFunction
  csvPOSTFunction: sendmail-dev-csvPOSTFunction
layers:
  None
Serverless: Run the "serverless" command to setup monitoring, troubleshooting and testing.

You can request API https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv by using the following curl command

POST /csv

$ curl -d 'csv=Alice%2Calice%40example.com%0D%0ABob%2Cbob%40example.com' https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv
{"id":"dd4e7777-fec4-453d-8f84-f85ae822223d"}

GET /csv

$ curl https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv
["dd4e7777-fec4-453d-8f84-f85ae822223d"]

GET /csv/{id}

$ curl https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv/dd4e7777-fec4-453d-8f84-f85ae822223d
"Alice,[email protected]\r\nBob,[email protected]"

DELETE /csv/{id}

$ curl -X DELETE https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/csv/dd4e7777-fec4-453d-8f84-f85ae822223d
"ec27b2d8-8295-4b44-aae8-a3d47e43d4c6 deleted"

Notice

The feature of sending email by using the Mailgun API does NOT work by default. In order to enable it, you must sign up with Mailgun for obtaining an API key, and use your own domain instead of 'example.com' in the source code.

escapin-sendmail's People

Contributors

dependabot-preview[bot] avatar kimusaku avatar

Stargazers

 avatar

Watchers

 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.