Skip to main content

Send SMS via Gmail SMTP servers.

Project description

pysendsms

pysendsms is a quick and simple way to use python to send SMS via Gmail SMTP servers to known a cell carrier.

Installation

Use the package manager pip to install pysendsms.

pip install pysendsms

Requires

  • A Gmail account with app specific password enabled for use. Manage Google Apps
  • Knowledge of which cell carrier provider the receiving party uses.

Usage

Import the library and create and SMS Object utilizing your gmail account and an application password created within your Google account.

import pysendsms

sms = pysendsms.SMS('<username>@gmail.com', '<password>')

Create an Contact object using the persons phone number and select a carrier from the avaible options.

CARRIERS is a json file in the project that can be checked for available carriers that can be used for messaging.

contact = pysendsms.Contact('311-555-2368', pysendsms.CARRIERS['AT&T'])

Use the SMS.send() method of your SMS object, passing the Contact and the message you would like to send as a string.

sms.send(contact, 'Hello, World!')

SMS.send() can also accept a list of contacts for sending out group messages.

group = [contact, contact, contact, contact]

sms.send(group, 'Everyone gets a message!')

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysendsms-0.1.4.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file pysendsms-0.1.4.tar.gz.

File metadata

  • Download URL: pysendsms-0.1.4.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for pysendsms-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1c2b83da071f4163cd2a3ec3e2fb24093017556e438b09a52f815d7f6ea54d65
MD5 f41801cb80c97c4a0982198e48b594b1
BLAKE2b-256 9ebe2911c1cce69d5939080c5fdc9e802f2cb6ec4b562e90c7d56b0d3347d639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page