Giter Club home page Giter Club logo

textbelt's Introduction

Textbelt

A module for sending unlimited texts for free

Taken mostly from typpo's textbelt, with a few improvements and lighter system, this module allows you to send texts through Node.js for free.

Installation

You must have sendmail (not the Node module, the native binary) installed. Then just npm install this package:

npm install textbelt

Include it in your project:

var text = require('textbelt');
text.sendText("555-555-5555", "Textbelt says hello");

API

text.sendText(phone, message, opts, cb)

Sends message as a text to phone. cb is an optional callback function, and opts is an optional object filled with options. If you want to include a callback function, you must include an opts parameter as well (it can be empty).

Possible opts:

var opts = {
  fromAddr: '[email protected]',  // "from" address in received text
  fromName: 'joe smith',       // "from" name in received text
  region:   'us',              // region the receiving number is in: 'us', 'canada', 'intl'
  subject:  'something'        // subject of the message
}

Do not include +1 or other codes in the phone number. Instead use the 'region' parameter.

text.debug(enable)

If enable is true, enables debugging output, which is disabled by default.

How It Works

Most, if not all, service providers have an email endpoint. When you send an email to the endpoint, the phone number receives a text. For example, sending an email to [email protected] will result in (123)456-7890 receving your email as a text.

This package just sends emails to all the providers in the region, hoping one will be correct :)

textbelt's People

Contributors

ajay-gandhi avatar spencerstreibel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

textbelt's Issues

Unable to use it in angular-5

Hello,
I am trying to implement this in my angular-5 project to send sms on click of a button but it's not working.
Facing error :- Cannot find name 'require'.

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.