I am using SMS gateway for sending the SMS messages using the python script. In SMS, I would be sending the users email in URL as get parameter. But whenever I am sending SMS with email address it is displaying @ as "inverted ?" symbol. Please see below for the code:
message = u'Click url http://services.indg.in/sms?email=medasandeep@yahoo.co.on to activate account'
values = {'username' : username,
'password' : password,
'smsservicetype' : smsservicetype,
'content' : message,
'mobileno' : numbers,
'senderid' : senderid
}
url = 'gateway url comes here'
postdata = urllib.urlencode(values)
req = urllib2.Request(url, postdata)
req.add_header("Content-Type","application/x-www-form-urlencoded");
req.add_header("User-Agent","Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)");
try:
response = urllib2.urlopen(req)
print response
response_url = response.geturl()
if response_url==url:
print 'SMS sent!'
except urllib2.URLError, e:
print 'Send failed!'
print e.reason