JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q62843F
  • License MIT

Send free SMS through Way2SMS.

Package Exports

  • way2sms

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (way2sms) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Send free SMS through Way2SMS.

# install as console app
$ npm install -g way2sms

# install as node.js package
$ npm install way2sms

console

$ way2sms <command> [options]
# Commands:
# - re-login: save login details (login)
# - logout: remove login details
# - smtoss: send sms (send)
# Options:
# -m | --mobileno: login mobile no. (user)
# -p | --password: login password
# -c | --cookie: login cookie
# -t | --tomobile: send sms to? (to)
# -# | --quiet: quiet mode
# Environment variables:
# WAY2SMS_MOBILENO: login mobile no.
# WAY2SMS_PASSWORD: login password
# WAY2SMS_COOKIE: login cookie
# WAY2SMS_TOMOBILE: send sms to?


# login to way2sms
$ way2sms login
Mobile no.: <9876543210>
Password: <password>

# send sms "foggy day" to 8976543210
$ way2sms send
To mobile: <8976543210>
Message: <foggy day>

# logout
$ way2sms logout

# login with arguments
$ way2sms login -m 9876543210 -p password

# send sms with arguments
$ way2sms send -t 8976543210 "foggy day"

# send sms with given login details
$ way2sms send -m 9876543210 -p password -t 8976543210 "foggy day"

# send sms with environment variables, quiet mode
$ WAY2SMS_MOBILENO=9876543210
$ WAY2SMS_PASSWORD=password
$ way2sms send -# -t 8976543210 "foggy day"

package

const way2sms = require('way2sms');
// way2sms.reLogin(<mobileno>, <password>): returns login cookie (promise)
// way2sms.smstoss(<cookie>, <tomobile>, <message>): sends sms (promise)

cookie = await way2sms.login('9876543210', 'password'); // reLogin
// <cookie string>

await way2sms.send(cookie, '8976543210', 'foggy day'); // smstoss
// (sent!)

way2sms