Commit 0ae53c9e by juan

validacion de telefonos para argentina en sms

1 parent 3a4472ff
......@@ -311,13 +311,13 @@ class SMS(ServiceBase):
if type(text) == bytes:
text = text.decode("utf-8")
try:
#response = requests.get(url = SMS.URL, params = {
# "phone" : data[Table.dest],
# "message" : text
#})
#print(data[Table.dest], text, info)
#print(stadoSms,text, Table.dest, info["smtp"]["device"], info["smtp"]["sim"],info["smtp"]["email"], info["smtp"]["pass"])
Sms.EnviarSMS(stadoSms,text, data[Table.dest], info["smtp"]["device"], info["smtp"]["sim"],info["smtp"]["email"], info["smtp"]["pass"])
tel = data[Table.dest]
v = ValidacionTelefonosArgentinos()
tel = v.ValidarTelefono(tel)
if tel == False:
print("Error de numero")
tel = "Error"
Sms.EnviarSMS(stadoSms,text, tel[2:], info["smtp"]["device"], info["smtp"]["sim"],info["smtp"]["email"], info["smtp"]["pass"])
success[file] = True if "OK" == "OK" else False
except:
success[file] = False
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!