Skip to content

Instantly share code, notes, and snippets.

@nskeip
Created September 13, 2012 09:37
Show Gist options
  • Save nskeip/3713222 to your computer and use it in GitHub Desktop.
Save nskeip/3713222 to your computer and use it in GitHub Desktop.
smsintel.ru django snippet
from django.conf import settings
def send_sms(phone, text):
q = ("<?xml version='1.0' encoding='UTF-8'?><data><login>%(login)s</login>" +
"<password>%(password)s</password><text>%(text)s</text><to number='%(phone)s'></to></data>") % {
'phone': phone.encode('utf-8'),
'text': text.encode('utf-8'),
'login': settings.SMS_INTELL_LOGIN,
'password': settings.SMS_INTELL_PASSWORD,
}
urllib2.urlopen('https://transport.smsintel.ru:7214/send.xml', q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment