From 7eb762151c2ce2fe2807778d1050b636c9f44307 Mon Sep 17 00:00:00 2001 From: "mga (Tiny/Axelor)" Date: Thu, 19 Feb 2009 11:25:32 +0530 Subject: [PATCH] make sms function working for the local service bzr revid: mga@tinyerp.com-20090219055532-5iybto8sdf183v55 --- bin/tools/misc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 5eee773f0f1..eb6ac0e702d 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -381,9 +381,10 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non # text must be latin-1 encoded def sms_send(user, password, api_id, text, to): import urllib - params = urllib.urlencode({'user': user, 'password': password, 'api_id': api_id, 'text': text, 'to':to}) - #f = urllib.urlopen("http://api.clickatell.com/http/sendmsg", params) - f = urllib.urlopen("http://196.7.150.220/http/sendmsg", params) + url = "http://api.urlsms.com/SendSMS.aspx" + #url = "http://196.7.150.220/http/sendmsg" + params = urllib.urlencode({'UserID': user, 'Password': password, 'SenderID': api_id, 'MsgText': text, 'RecipientMobileNo':to}) + f = urllib.urlopen(url+"?"+params) # FIXME: Use the logger if there is an error return True