there's no error on my program.. the problem in the number of the sender will not define.. i dont know where is the problem...
here's my code
Code:import messaging import inbox import time import contacts import appuifw import sys box = inbox.Inbox(inbox.EInbox) def any(string1, string2): for i in range(len(string2)-1): if string1.find(string2[1:1+1])>-1: return True return False def autoreply(messageID): time.sleep(5) sender = box.address(messageID) text = box.content(messageID) if not any(sender, "0123456789"): db = contacts.open() firstName = sender.split(" ")[0] lastName = sender.split(" ")[-1] contactList = db.find(firstName) for contact in contactList: try: contact.find("last_name")[1] except IndexError: phoneNumber = sender reply = u"Thank You For Texting me" print 'Sending: "'+reply+'" to '+phoneNumber messaging.sms_send(phoneNumber, reply) appuifw.note(u"Message Sent") break box.bind(autoreply)
for example the sender name is admin ramos.
i accept the messege and it will print sending: thank you for texting me admin ramos
then the program will automatically send to admin ramos.
but the admin ramos can't accept the message...
then when i see on the sent items >> message details
To:ramos admin<ramos admin>
the number can't identify...
i think the message details must equal to
To: ramos admin <THE NUMBER OF THE SENDER>
please help me guys.....

Reply With Quote

