Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
phone:gammu_send_sms [2011/06/07 09:56]
flozz [Send SMS using Python]
phone:gammu_send_sms [2017/09/01 12:24] (current)
Line 27: Line 27:
  
 import gammu import gammu
 +
 +
 +SMS = {
 +        '​Class':​ 1,                            #SMS Class
 +        '​Text':​ "Hello World from Python", ​    #​Message
 +        '​SMSC':​ {'​Location':​ 1},
 +        '​Number':​ "​+336xxxxxxxx", ​             #The phone number
 +      }
  
  
Line 33: Line 41:
 gamu_sm.Init() ​                   #Connect to the phone gamu_sm.Init() ​                   #Connect to the phone
  
-gamu_sm.SendSMS({                 #Send the SMS +gamu_sm.SendSMS(SMS)              ​#Send the SMS
-        '​Class':​ 1, +
-        '​Text':​ "Hello World from my Python script :)", +
-        '​SMSC':​ {'​Location':​ 1}, +
-        '​Number':​ "​+336xxxxxxxx",​ +
-        })+
  
 </​code>​ </​code>​
 
phone/gammu_send_sms.txt · Last modified: 2017/09/01 12:24 (external edit)