Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
message-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 0ae53c9e
authored
2020-08-09 13:58:55 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
validacion de telefonos para argentina en sms
1 parent
3a4472ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
services.py
services.py
View file @
0ae53c9
...
...
@@ -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
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment