SMS Dispatch Manager

Table of contents LinkedIn social network LinkedIn social network LinkedIn social network LinkedIn social network Share on social media

Sending SMS with Python script

Sending SMS from a Python script using the SMS Dispatch Manager program from LUTEUS can be set up quickly using the code presented on this page.

The code is available by default in the /bin directory where the SMS Dispatch Manager program has been installed.

Before using it, check that the path msg_path specified at the beginning of the script points to the path of your installation.

To use the script in an online command window, first select the /bin directory and then type the following command:

H:\Python32>SendSMS.py -h

SendSMS.py -r <one recipient list name> -m <SMS_msg>
SendSMS.py -SMS_recipient <one recipient list name> -SMS_msg <SMS_msg>

The recipient list name should be defined first in the SMS Dispatch Manager recipient list

Example

python script sms sent

If the script is running, verify that you have a new XML file in your /bin/sms_queue directory. The SMS Dispatch Manager program scans this directory at regular intervals to include in its processing queue all the files in an XML format of the correct format (example below)

SMS posted in SMS queue

The SMS message must be also visible in the SMS Distach manager queue.

SMS queue

The python script code given below can also be forked and used in othe script applications.

Send SMS python script

If you opt for SMS Dispatch Manager as a complementary program of our LoriotPro network supervision program, it will allow you to receive SMS alarms generated by our supervision solution directly on your mobile phone.





www.loriotpro.com