echo "Hello world from my PC" | gammu sendsms TEXT <PhoneNumber>
#!/usr/bin/python # -*- coding: UTF-8 -*- import gammu SMS = { 'Class': 1, #SMS Class 'Text': "Hello World from Python", #Message 'SMSC': {'Location': 1}, 'Number': "+336xxxxxxxx", #The phone number } gamu_sm = gammu.StateMachine() gamu_sm.ReadConfig() #Read the default config file (~/.gammurc) gamu_sm.Init() #Connect to the phone gamu_sm.SendSMS(SMS) #Send the SMS