def SendMessage(self, message):
        """Message is string to send to user"""
        self.message = self.toHtml(message)
        num = len(self.message)+len(self.whofrom)+len(self.subject)
        if num > 110:
            return 2
        astring = 'http://www.mobile.att.net/messagecenter/pagersend.cgi?pin="'
        astring = astring + self.number
        astring = astring + '"&from="'
        astring = astring + self.whofrom
        astring = astring + '"&subject="'
        astring = astring + self.subject
        astring = astring + '"&message="'
        astring = astring + self.message
        astring = astring + '"&size="'
        astring = astring + str(num)+'"'
        #print astring
        
        myUrlclass = urllib.FancyURLopener()
        try:
            webPage = myUrlclass.open(astring)
            #print webPage
        except IOError:
            print 'webaddress failed'
            return -1
        #while 1:
        data = webPage.read(8192)
        if data:
            #print str(data)
            if string.find(str(data),"<TITLE>400 Bad Request</TITLE>") != -1:
                return 4
        else:
            return 3
        
        webPage.close()
        return 0
Message is string to send to user
recipes/Python/192400_Send_SMS_messages_ATTwireless/recipe-192400.py