Giter Club home page Giter Club logo

pyms's Introduction

PyMS

Send text messages from python

Usage

As found in example.py

from gateways import GATEWAYS
from sender import PyMS

pyms = PyMS()
pyms.connect()
pyms.send_sms('1234567890', GATEWAYS['SPRINT']['SMS_EMAIL'], "Test")
pyms.disconnect()

Defaults

PyMS uses a few default settings to make this all work. The following inputs can be provided to PyMS(...)

  • username the account username in the form [email protected]. Defaults to system environment variable PYMS_USERNAME
  • password the password for the account. Defaults to system environment variable PYMS_PASSWORD
  • host the SMTP server hostname. Defaults to smtp.gmail.com
  • port the SMTP server port. Defaults to 465

Gmail

As found out from radtek on Stack Overflow, you need to allow your Gmail account to work with a less secure app by flipping a switch here https://www.google.com/settings/security/lesssecureapps as this type of login is considered unsecure

Gateways

PyMS uses SMS / MMS gateways to deliver messages to a mobile device. Most US carriers should be provided in the GATEWAYS dict in gateways.py for usage. These gateways taken from here

Drawbacks

Currently the carrier of the mobile device must be known to send a message

This may be overcome by hitting http://www.fonefinder.net/ and scraping the results however it presents issues if a user changes there carrier but maintains the same phone number. Most other services are paid for including any API's that exist.

pyms's People

Contributors

william-reed avatar

Watchers

 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.