Giter VIP home page Giter VIP logo

sendgrid-inbound's Introduction

Overview

SendGrid has an Email Inbound Parse Webhook which posts data from a specified incoming email address to a URL of your choice. This library allows you to quickly and easily deployable solution that help you easily get up and running processing (parse and complete some action) your inbound parse webhooks.

This is docker-based solution which can be deployed on cloud services like Heroku out of the box.

Table of Content

Prerequisite

Clone the repository

git clone https://github.com/KoditkarVedant/sendgrid-inbound.git

Move into the clonned repository

cd sendgrid-inbound

Restore the Packages

dotnet restore

Deploy locally

Setup your MX records. Depending on your domain name host, you may need to wait up to 48 hours for the settings to propagate.

Run the Inbound Parse listener in your terminal:

git clone https://github.com/KoditkarVedant/sendgrid-inbound.git

cd sendgrid-inbound

dotnet restore

dotnet run --project .\Src\Inbound\Inbound.csproj

Above will start server listening on a random port like below

In another terminal, use ngrok to allow external access to your machine:

ngrok http PORT_NUMBER

Update your SendGrid Incoming Parse settings: Settings Page | Docs

  • For the HOSTNAME field, use the domain that you changed the MX records (e.g. inbound.yourdomain.com)
  • For the URL field, use the URL generated by ngrok + /inbound, e.g http://XXXXXXX.ngrok.io/inbound

Next, send an email to [anything]@inbound.yourdomain.com, then look at the terminal where you started the Inbound Parse listener.

Deploy to Heroku

Create Heruko account if not already present

Install the Heroku CLI

Download and install the Heroku CLI.

If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

$ heroku login

Now you can sign into Container Registry.

$ heroku container:login

Create app in heroku

$ heroku apps:create UNIQUE_APP_NAME

Push your Docker-based app Build the Dockerfile in the current directory and push the Docker image.

$ heroku container:push web --app UNIQUE_APP_NAME

Deploy the changes Release the newly pushed images to deploy your app.

$ heroku container:release web --app UNIQUE_APP_NAME

Testing the Source Code

You can get all the test cases inside the Tests folder.

Contribution

If you would like to contribute to this project, please see our contributing guide. Thanks!

sendgrid-inbound's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar koditkarvedant 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.