Giter VIP home page Giter VIP logo

sms-via-email-1's Introduction

About

This code demonstrates how to use SendGrid's "Inbound Parse Webhook" and Twilio SMS to send and receive SMS messages via email.

Setup Tips

  1. Configure your domain to have a subdomain called "sms" that points to "mx.sendgrid.net".

  2. Clone my GitHub repository to your local machine:

     git clone https://github.com/jpf/sms-via-email.git
    
  3. Change in to the sms-via-email directory you just cloned:

     cd sms-via-email
    
  4. If you haven't already, log in to Heroku from your command line:

     heroku login
    
  5. Tell Heroku to create a new application for you:

     heroku create
    
  6. Configure your new Heroku application with your Twilio and SendGrid credentials:

     heroku config:set SENDGRID_USERNAME=
     heroku config:set SENDGRID_PASSWORD=
     heroku config:set TWILIO_ACCOUNT_SID=
     heroku config:set TWILIO_AUTH_TOKEN=
    

    Make sure you put your SendGrid and Twilio authentication credentials after the equals signs above!

  7. Configure your Heroku application with the email domain you configured above.

     heroku config:set EMAIL_DOMAIN=
    

    Your email domain goes after the equals sign above!

  8. Deploy the code you just checked out from GitHub to Heroku:

     git push heroku master
    
  9. Check to see if the code is configured correctly:

     heroku open
    
  10. If a web browser opens and you see the text: “Congratulations, this software appears to be configured correctly.” then you’re almost done.

  11. Take note of the “SendGrid Inbound Parse Webhook URL” and the “Twilio Messaging Request URL”. Use those URLs as the webhook URLs for SendGrid and Twilio.

  12. Rename the "address-book.cfg.sample" to "address-book.cfg" and configure it with your Twilio phone number and your email address. Check that file into git and push your change to Heroku.

    mv address-book.cfg.sample address-book.cfg
    nano address-book.cfg
    git add address-book.cfg
    git commit -m 'updated address book'
    git push heroku master
    
  13. Try sending an SMS to your Twilio phone number, you should get the text you sent in email. The first line of your reply to that email should get send back as a SMS message.

sms-via-email-1's People

Contributors

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