2024-08-22 07:16:24 +00:00
|
|
|
"""Examples for using the CPSMS gateway package."""
|
2011-11-21 22:27:16 +00:00
|
|
|
|
|
|
|
import cpsms
|
|
|
|
|
2021-11-03 13:25:53 +00:00
|
|
|
|
|
|
|
# This will send text messages to Bob and Carol respectively. On their
|
|
|
|
# devices, the sender will shown as "Alice".
|
|
|
|
|
|
|
|
gateway = cpsms.Gateway("username", "password", "Alice")
|
|
|
|
gateway.send("4512345678", "Hello Bob")
|
|
|
|
gateway.send("4587654321", "Hello Carol")
|
|
|
|
|
|
|
|
# The `.send()` method will return the response from the SMS gateway. Have a
|
|
|
|
# look at the CPSMS documentation to see what responses look like:
|
|
|
|
# <https://api.cpsms.dk/documentation/index.html#send>
|